Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2002-07-03
6
Medium Priority
?
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 280 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
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 
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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
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…
Suggested Courses

609 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