Frames Navigation Help, Please.

M

Martin Schmid

I've got a page w/ frames... one is a navigation frame with some
ImageButtons. In the navigation frame, there is also a drop-down list. I
need to redirect the mainFrame based on which ImageButton is selected, and
which value is selected in the drop-down list.

I.e., each ImageButton is a thumbnail image, and the dropdown lets the
viewer select the result size of the image... 25%, 50%, 100%. I need to
dynamically generate something that tells the mainFrame to go to:
showimage.aspx?file=/myweb/photos/Chihuly/09300002.JPG&size=0.25 where after
the file= is based on which thumbnail selected and the size= is based on the
value in the drop down.

My showimage.aspx works... I just need to nail down this navigation. Any
ideas?
 
V

Vidar Petursson

Hi

<ELEMENT onclick="doIt(this.src)".....
Where ELEMENT is a <img or <input type="image, if its a input then return
false
so it won't submit: <input type="image" onclick="doIt();return false"...

function doIt(sImgSrc){
var e = document.forms["FORMNAME"].SELECTNAME;
parent.FRAMENAME.location.href = "showimage.aspx?file=" + sImgSrc + "&size="
+ e.options[e.selectedIndex].value;
}
Where SELECTNAME is the name of the dropdown and FRAMENAME the name
of the target frame

More info:
http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
 
M

Martin Schmid

Needed a little work... but it got me there..

Thanks!

--
Thanks,
Martin Schmid, EIT, CCSA, MCDBA, MCSE
Vidar Petursson said:
Hi

<ELEMENT onclick="doIt(this.src)".....
Where ELEMENT is a <img or <input type="image, if its a input then return
false
so it won't submit: <input type="image" onclick="doIt();return false"...

function doIt(sImgSrc){
var e = document.forms["FORMNAME"].SELECTNAME;
parent.FRAMENAME.location.href = "showimage.aspx?file=" + sImgSrc + "&size="
+ e.options[e.selectedIndex].value;
}
Where SELECTNAME is the name of the dropdown and FRAMENAME the name
of the target frame

More info:
http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
Martin Schmid said:
I've got a page w/ frames... one is a navigation frame with some
ImageButtons. In the navigation frame, there is also a drop-down list. I
need to redirect the mainFrame based on which ImageButton is selected, and
which value is selected in the drop-down list.

I.e., each ImageButton is a thumbnail image, and the dropdown lets the
viewer select the result size of the image... 25%, 50%, 100%. I need to
dynamically generate something that tells the mainFrame to go to:
showimage.aspx?file=/myweb/photos/Chihuly/09300002.JPG&size=0.25 where
after
the file= is based on which thumbnail selected and the size= is based on
the
value in the drop down.

My showimage.aspx works... I just need to nail down this navigation. Any
ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top