big-dog1965 Posted August 4, 2009 Share Posted August 4, 2009 How do I get this to work the top link is what I want to do the 2nd works but in a whole new page I want it in my frame as the top one indicates NOTE if the top one is left in the whole thing bombs out and no links show up at all function toprightmenu() { retVal = "<a target=\"mainframe"href=\"../forms/Contest/contest.html\">Win My Windows</a><br> " + "<a href=\"forms/Contest/contest.html\">Win My Windows</a><br> " + "<a href=\"http\">Some Other Link</a><br> " + "<a href=\"http\">Some Other Link</a>"; return retVal; } Link to comment https://forums.phpfreaks.com/topic/168762-using-a-js-file-for-links/ Share on other sites More sharing options...
phpSensei Posted August 4, 2009 Share Posted August 4, 2009 You should post this in the javascript board. Link to comment https://forums.phpfreaks.com/topic/168762-using-a-js-file-for-links/#findComment-890379 Share on other sites More sharing options...
Adam Posted August 4, 2009 Share Posted August 4, 2009 You have to escape quotes if they are within quotes, i.e: "<a target=\"mainframe\" href=\"../forms/Contest/contest.html\">Win My Windows</a><br> " + Note the added slash after 'mainframe'. You'll need to add that target to each link you want to open within the frame. Link to comment https://forums.phpfreaks.com/topic/168762-using-a-js-file-for-links/#findComment-890398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.