making un-visible a specific part of url generated by javascript + codeigniter - javascript

http://www.blabla.com/our_work/client/client-name#/uploads/18.jpg
I use CodeIgniter, and this is the url I have. I use a gallery script at the page, and it generates #/uploads/18.jpg such thing at url :( is there any way to make it unvisible or sth . maybe with htaccess. i dont know.
i dont want to spend an another day finding an another gallery script, im already out of deadline :(
appreciate helps...

Just leave it there. What's the harm? Really. You are on a deadline, and are wasting time trying to remove a #tag from the url.

Can we have a look at the gallery script? perhaps you could edit something there to make it work. That's what I always do with the scripts I use to make them work with CI.

I'm afraid that's how it's supposed to work. the '#' part is an HTML anchor that the script uses to do the switching as far as I know. You might to look for a different script.

you can try to play with window.location in JS erasing the string after hash, but I doubt that would make some sense.

Related

Popup Window on PHP Table

Hello everyone I am a newbie and a student and there is a code in PHP that I want to have on my PHP.
So what I want is if I click the URL it should popup a new window. I know how to do it in a button but I have no idea how to do it using echo.
PS: THIS IS THE CODE I WANT TO REPLACE
echo"<td><a href=update.php?primary=".$row['ID']."'>Update</a>";
PS: Please correct me / Teach me.
PS: I am now able to open it in a new window but the problem is I am not able to get the primary.
Here is my code: echo"<a href=update.php target=popup onclick=window.open('update.php','popup','width=500,height=500');return false;?primary=".$row['ID'].">Update ";
Please do research before asking a question.
Ether way, I suggest over all you'd visit a site called W3Schools, its very basic, but provides with pretty useful stuff.
In this case you need to add the attribute "target", to _blank If I am not mistaken. You can read about what kind of target attribute options you can do hare: https://www.w3schools.com/tags/att_a_target.asp
Since you are a new contributor, I suggest looking trough that site at minimal before going with a post.
Added the solution with explanation.
echo"<td><a href=update.php?primary=".$row['ID']."'>Update</a>";
Change it to:
echo"<td><a target='_blank' href='update.php?primary=".$row['ID']."'>Update</a>";
By the way, you forgotten to add a qoute on your href attribute, this might've been causing some problems.
The target is a "<a>" tag attribute, its just html, echo from PHP side just acts as a renderer from php files. So whatever you put in your echo will render with HTML. Its important to add <head> and <html> tags so it would render like a full HTML document, just having php tags. It is wise to separate these things to make a proper framework A.K.A - using template system and leaving PHP parts to be only calculations from endpoint (Server side). I'd advise you to learn some sort of framework like Symfony based frameworks (Laravel for example). It will be a bigger hustle to learn, but you would learn it the right way and would know way more about these things from that.
echo"<td><a target=_blank href='update.php?primary="'.$row['ID'].'"'>Update</a>";
target=_blank is what you want to open a new window from a link href.

How can I add embed function to a page

How can I add this function to something: http://awesomescreenshot.com/0ec17ri8dc
Its from this page.
Notice when you click on it a popup appears with the generated html to add the code somewhere. Have ben unable to find a good google search query that doesn't bring up irrelevant pages.
Thanks in adv.
Here's a quick solution.
If you know some basic jQuery you won't have problems with understanding the code but feel free to ask if you need any help.
Keep in mind that the code won't trigger a pop-up, it's just to get the embed code. I'd suggest using some plugin for this, fancybox is a good one.

what is the name of the slideshow script in wipro site?

what is the name of the image slide show at :
http://www.wipro.com/index.htm and where can I find the script for free plz? I need to use it in a page built with php, html,css, javascript.
thanks
http://imageflow.finnrudolph.de/ ?
When you want to know usage of elements of a website, look at the code source.
Image Flow : http://imageflow.finnrudolph.de/
Uh...word of caution: Wipro is a horrifically bad IT outsourcing megacorp. I'd NEVER borrow any code that they use. Having had to work with them, I can tell you the code that comes from that operation is pretty much useless.

How to view all html content using Javascript?

I am trying to find a way to save all html content from a webpage to a variable. This should work even if the webpage has frames in it. By current best solution is:
javascript: alert(document.body.outerHTML);
Just paste the code into the control in your browser where the url is placed and push enter to see the result. Any idea how to do this?
You should cycle over all the frames and ajax-load the content.
Somethings like
document.getElementsByTagName('frame')[0].src
to get the source. But I strongly suggest you to use library to help you out. In jquery can be quite simple task. Cycle over all frames, than $.ajax request all the externals source and build it (replacing the relative section)
But, as pointed by smeg4brains, innerHTML can be your way.
Here is the direct answer to "how to do this":
Having this in the address bar just press Enter and you'll see the contents in alert dialog.
To see contents of frames you'll have to iterate them separately it won't be part of the HTML.
Does this work?
var copyOfHtml = document.documentElement.outerHTML
alert(copyOfHtml)

Anyone know of a javascript removal tool for html

I am having issues with an Ebay template, if I try to upload it get's kicked back to me saying that it cannot contain javascript, I'm assuming that it's in the picture rollover option (mouseover pic enlarging tool) Any help would be greatly appreciated, I'm not real Java intuitive.
Just delete anything between the <script> and </script> tags. Or perhaps post the code snippet here so we can tell you what to remove.
The template should have a HTML file inside.
Search for ... parts and remove them as mentioned before.
Search for instances of onmouseover="...", onmouseout="..." and generally anything that looks like , removing the onsomeevent="dosomething" part.

Categories

Resources