Solved

Drop down box and putting an image instead of submit button?

Posted on 2002-07-03
6
151 Views
Last Modified: 2013-12-24
Hello

I have a drop down box with 3 options ,and want put an image instead of submit button so when i click image, a page which is related to (e.g first option )open in another frame,how can i do it?
Thanks
0
Comment
Question by:MOSTAGHASSI
  • 3
  • 3
6 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 70 total points
ID: 7127601
You have to edit the code. FrontPage may not help you much.

You need to change it from a SUBMIT to an IMAGE, like this

<input type="image" name="submit" src="yourgraphic.gif" alt="alt text here" width="XXX" height="XXX" border="0">

Naming it SUBMIT causes most browsers to treat it as a submit button.
0
 

Author Comment

by:MOSTAGHASSI
ID: 7127726
hi webwoman

Please let me know how can i relate an option in drop down box to a .html page so when i click image the page open?
0
 

Author Comment

by:MOSTAGHASSI
ID: 7133551
Thank you,but you could write 2 lines for me relating options to another pages.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 19

Expert Comment

by:webwoman
ID: 7133709
You have to edit this yourself, FrontPage will NOT do any of it for you. And make sure it doesn't try to 'fix' it..

You actually don't even need a button if you don't want one. If you use this...
 <select name="choices" onChange="javascript:window.location.href=document.site.choices.options[document.site.choices.selectedIndex].value">
You'll go to that place when you select something. You need to set the option value to the URL you want to go to.

There are a few ways you can do it using a button. It doesn't even really need to BE a button, it can be just a graphic set as a link. Use an onclick to call a function.

I haven't tested this. It needs to go in the HEAD tags.
<script language="javascript">
function goHere(url) {
url=document.site.choices.options[document.site.choices.selectedIndex].value
window.location.href=url;
}
</script>
where site is the form name, choices is the select name (that applies for the other piece of script too)

And on the image (not a button) you'd use
onclick="goHere('your_url_here')"

I didn't post anything more than what I did because you didn't say WHY you wanted an image button or what you were trying to do. I suspect this is going to be very confusing for you. There's ALWAYS more than one way to do something, and the more detail you can give on what you want to do the better answer you're going to get.

And I'm not sure you are comfortable with editing the code directly -- always a concern for anyone who posts in this topic area.
0
 

Author Comment

by:MOSTAGHASSI
ID: 7134026
hi

Yes i'm comfortable for written codes and tomorrow test these codes.

I had another question about using button from flash in frontpage(2 day ago) that was not possible for hyperlink and u answered that i must publish as animated gif ,but now i have to say that it does not work ,i donot have animation in this state but hyperlink is possible,i think there must be a way simple for using button from flash in frontpage.

Thank you
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7134125
You publish the animated GIF from Flash, not FrontPage. It should be under the SAVE AS option. Once you have a GIF, you use it just like any GIF. Animated or not, it doesn't matter.

You're not going to see ANY animation while you're in FrontPage. NOTHING works while you're in FrontPage, not even FrontPage stuff.

If you're comfortable with codes, you might want to look at other web editors. FrontPage tends to add/change/'fix' things, sometimes conveniently breaking your code.

It's not just FP, all WYSI(N)WYG editors are like that.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now