kanala Posted March 11, 2008 Share Posted March 11, 2008 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 More sharing options...
kanala Posted March 11, 2008 Author Share Posted March 11, 2008 Sorry, I figured it out by using onclick instead of href. Link to comment Share on other sites More sharing options...
ali_ggl Posted March 13, 2008 Share Posted March 13, 2008 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 More sharing options...
Synook Posted March 14, 2008 Share Posted March 14, 2008 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 More sharing options...
justsomeguy Posted March 14, 2008 Share Posted March 14, 2008 Unless you can trick the forum. <a href="javascript:document.getElementById('page').src='home.html';">Home</a> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.