Solved

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

Posted on 2002-07-03
6
154 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
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…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

820 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