Page 1 of 1

hyperlinks not working...help please

Posted: 2013-10-23 15:27
by motdaugrnds
Can anyone tell me what I'm doing wrong with this scripting?
I'm trying to turn four (4) Iframes into one Iframe with several hyperlinks on my "index.php" file.

On that page I have a table with 2 columns. I'm only working now with the widest column on the left side. I placed this coding between the <head></head> tags in my index.php file:

<HEAD><TITLE>farm-sales</TITLE><script type="text/javascript">function showPage(typeName) {try {var lstrPageName = '';switch (typeName) {case "antique":lstrPageName = 'antique.html';break;case "finejewelry":lstrPageName = 'FineJewelry.html';break;case "costume":lstrPageName =
'costume.html';break;case "loose":lstrPageName = 'loosestones.html';break;}document.getElementB---('mainFrame').src = lstrPageName;} catch (e) {alert('There was an error while trying to load the page: ' + e);}}</script></HEAD>

Then I placed this coding into the table. (You can see it by "view source" if you want.)

[ <a href="javascript:showPage('antique');">Antique Jewelry</a> | <a href="javascript:showPage('finejewelry');">Fine Jewelry</a> | <a href="javascript:showPage('costume');">Costume Jewelry</a> | <a href="javascript:showPage('loose');">Loose Stones</a> ]<br /><!-- This is coding for the Iframes. !--><iframe src="antique.html" width="100%" height="1200" border="0" scrolling="" id="mainFrame"></iframe><!-- Above is the coding for several Iframes. !-->


I did get the one Iframe; however, the hyperlinks don't work. What did I do wrong?

You can see my site at

Code: Select all

http://motdaugrnds.com/farmsales

Re: hyperlinks not working...help please

Posted: 2013-10-24 17:34
by botg
Oh dear, javascript for what could be simple links...

Re: hyperlinks not working...help please

Posted: 2013-10-25 10:26
by motdaugrnds
Well, now that was great information; however, without knowledge of those "simple links", I'm still pretty much stuck. :(

Re: hyperlinks not working...help please

Posted: 2013-10-25 21:18
by boco
The problem is, we don't deal with website code at all, only FTP. You may not get much answers here, the better option would be asking in a dedicated HTML/JS forum.

was not a new top, just reply

Posted: 2013-10-26 00:02
by motdaugrnds
Thank you. I had thought this forum was for "all things html"; and I don't know of any forum where I might get an answer.

Re: was not a new top, just reply

Posted: 2013-10-27 02:41
by boco
This forum only exists so the HTML questions don't clutter the main forums. Additionally, there are chances (albeit low) that someone skilled passes by and answers your question.

Here is the HTML forum's description (most people seem to overlook it):
Post all HTML related questions here. No support.

Edit: I will combine the topics. Edit 2: Done.