Jump to content

Whats wrong with my javascript?


kanala

Recommended Posts

I have a link which has javascript in it.<a href="java script:document.getElementById('page').src='home.html';">Home</a>It is supposed to change the <iframe id="page"> to home.html, but all it does it go to a blank page with the URL asjava script:document.getElementById('page').src='home.html';, and home.html written on the blank page. Help.

Link to comment
Share on other sites

Hi use this line of link with your script.

<a href="java script:document.getElementById('page').src='home.html';">Home</a>

Remove a space from your javascript key word in link hope it will work.Ali.

I have a link which has javascript in it.<a href="java script:document.getElementById('page').src='home.html';">Home</a>It is supposed to change the <iframe id="page"> to home.html, but all it does it go to a blank page with the URL asjava script:document.getElementById('page').src='home.html';, and home.html written on the blank page. Help.
Link to comment
Share on other sites

This forum automatically adds a space in the javascript keyword to prevent XSS. So if you see that, 90% its not what they typed :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...