Reply
Can't pass correct multiple hidden values in form
Old 11-13-2008, 12:32 PM Can't pass correct multiple hidden values in form
Novice Talker

Posts: 12
Name: jyoung
My form has 3 "plan your route" buttons, one for each office location in the city, and then one set of input fields for the starting address, city, state, zipcode.

When you enter your address and then press one of the buttons it should open a MSN map window showing the map and driving directions to that particular offices location. Instead, it shows the same map and directions no matter which button you push. The only way I can make it work is if I set up 3 different forms that each have their own set of starting address fields but it looks terrible on the screen.

I included the HTML code below and I'm hoping someone can tell me how to make it do what I want it to do.

<div style="text-align:center;">
<!--gem:tlx.tlx.map-->
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<TD ALIGN="center">
<form action="http://maps.msn.com/directionsFind.aspx" method="get" style="margin-bottom:0" target="_blank">
<table border="0" cellpadding="0" cellspacing="0">
<TR>
<TD ALIGN="center"><input name="strt2" type="hidden" value="2801 Youngfield St "><input name="city2" type="hidden" value="Golden "><input name="stnm2" type="hidden" value="CO "><input name="zipc2" type="hidden" value="80401"><input border="0" src="/addon/maps/white_plan_route.gif" type="image">
</TD>
<TD ALIGN="center"><input name="strt2" type="hidden" value="12001 63rd Pl "><input name="city2" type="hidden" value="Arvada "><input name="stnm2" type="hidden" value="CO "><input name="zipc2" type="hidden" value="80004"><input border="0" src="/addon/maps/white_plan_route.gif" type="image">
</TD>
<TD ALIGN="center"><input name="strt2" type="hidden" value="808 S Public Rd "><input name="city2" type="hidden" value="Lafayette "><input name="stnm2" type="hidden" value="CO "><input name="zipc2" type="hidden" value="80026"><input border="0" src="/addon/maps/white_plan_route.gif" type="image">
</TD>
</TR>
<TR>
<TD ALIGN="center" COLSPAN="3">
<table border="0" width="550">
<TR>
<TD ALIGN="left" COLSPAN="2"><span style="font-weight:bold;font-size:13px;">Enter your starting address:</span></TD>
</TR>
<TR>
<TD ALIGN="right"><span style="font-size:13px;">Street Address: </span></TD>
<TD><INPUT NAME="strt1" SIZE="30" TYPE="text"></TD>
</TR>
<TR>
<TD ALIGN="right"><span style="font-size:13px;">City: </span></TD>
<TD><INPUT NAME="city1" SIZE="30" TYPE="text"></TD>
</TR>
<TR>
<TD ALIGN="right"><span style="font-size:13px;">State: </span></TD>
<TD><INPUT NAME="stnm1" SIZE="30" TYPE="text"></TD>
</TR>
<TR>
<TD ALIGN="right"><span style="font-size:13px;">ZIP Code: </span></TD>
<TD><INPUT NAME="zipc1" SIZE="30" TYPE="text"></TD>
</TR>
</table>
</TD>
</TR>
</table>
</form>
</TD>
</TR>
</table>
<!--end gem--><!--"''"-->
</div>
jyoung00 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 11-20-2008, 07:38 AM Re: Can't pass correct multiple hidden values in form
Skilled Talker

Posts: 53
Name: Morten
Well I don't have a solution.

But I don't think the code is THAT bad.
__________________
- Do Nothing!
- Get Nothing!
http://www.dworl.com
Rotco88 is offline
Reply With Quote
View Public Profile
 
Old 11-21-2008, 01:03 AM Re: Can't pass correct multiple hidden values in form
Novice Talker

Posts: 12
Name: jyoung
Thanks...I needed that.

It doesn't look too bad as it is but when I put 3 sets of identical fields so that you could put in your starting address and then 3 more buttons for THAT submit it really does look horrid.

I came up with a drop-down so you could select the destination office you were trying to get to and then I would only have to have the one set of starting address fields and one button for that submit but then I can't seem to pass the values for the destination. I don't know if there is something that prevents you from having two forms on one page or what but my attempts are all failing.

I've been trying to get this working for over a month now and my forehead is getting flat from banging my head against the keyboard in frustration.

Last edited by jyoung00 : 11-21-2008 at 01:04 AM.
jyoung00 is offline
Reply With Quote
View Public Profile
 
Old 11-21-2008, 04:28 AM Re: Can't pass correct multiple hidden values in form
Average Talker

Posts: 22
Name: Pieter
First tip, use the web standards it wil make youre pages way better.

And it doesn't work becaus you have all the hidden file's have the same name and they ar in the same form, so every time you "ovverride" an exising name. It wil erase its previous data and input the new data.
elcosmo is offline
Reply With Quote
View Public Profile
 
Old 11-21-2008, 02:07 PM Re: Can't pass correct multiple hidden values in form
Novice Talker

Posts: 12
Name: jyoung
I tried renaming the hidden fields to different names and it doesn't change what it is doing at all, it still passes the address in the first line no matter which of the buttons you push.

HTML Code:
<TR>
<TD ALIGN="center"><input name="strt2" type="hidden" value="2801 Youngfield St "><input name="city2" type="hidden" value="Golden "><input name="stnm2" type="hidden" value="CO "><input name="zipc2" type="hidden" value="80401"><input border="0" src="/addon/maps/white_plan_route.gif" type="image">
</TD>
<TD ALIGN="center"><input name="strt3" type="hidden" value="12001 63rd Pl "><input name="city3" type="hidden" value="Arvada "><input name="stnm3" type="hidden" value="CO "><input name="zipc3" type="hidden" value="80004"><input border="0" src="/addon/maps/white_plan_route.gif" type="image">
</TD>
<TD ALIGN="center"><input name="strt4" type="hidden" value="808 S Public Rd "><input name="city4" type="hidden" value="Lafayette "><input name="stnm4" type="hidden" value="CO "><input name="zipc4" type="hidden" value="80026"><input border="0" src="/addon/maps/white_plan_route.gif" type="image">
</TD>
</TR> 
It always passes your correct starting address values but the destination ones don't change like they should.

jyoung00 is offline
Reply With Quote
View Public Profile
 
Old 11-22-2008, 01:43 AM Re: Can't pass correct multiple hidden values in form
Novice Talker

Posts: 12
Name: jyoung
SOLVED...although I can't make this work I finally figured it out using javascript. Thanks for taking the time to try to help me. I really appreciate it.
jyoung00 is offline
Reply With Quote
View Public Profile
 
Old 11-22-2008, 04:57 AM Re: Can't pass correct multiple hidden values in form
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Even if you have bypassed it, it's a shame not to figure out what you did wrong. My guess would be that putting the form's opening tag inside one table area and other bits of the form elsewhere, is risky.

I prefer to stick the form's opening tag outside all tables (and same with the closing).

I don't know if that will make any difference in your case. It could do. By the way I know that when you parse web data in perl there are times (eg with a checkbox input) where the name of the input must NOT have numbers in it. I recall having to change tonnes of html with numbers so that i put them into words - eg name="thing_two" instead of "thing2".

I think the main area you are going wrong in is the use of aspx. But there's nothing you can do about that!
witnesstheday is offline
Reply With Quote
View Public Profile
 
Old 11-22-2008, 07:55 AM Re: Can't pass correct multiple hidden values in form
chrishirst's Avatar
Super Moderator

Posts: 19,022
Location: Blackpool. UK
Quote:
I think the main area you are going wrong in is the use of aspx. But there's nothing you can do about that!

well given that it's on MSN.com ( maps.msn.com/directionsFind.aspx" ) what would you think they would use?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System | Bits & Bobs
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-24-2008, 10:33 AM Re: Can't pass correct multiple hidden values in form
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Okay, I'm just an anti-microsoft guy, I admit it. It's wrong. There's bound to be 1 or 2 situations when you're better off than with a Linux server.

It's not that I didn't know he had a microsoft server (well where else can you use aspx anyway? no wait - i expect that can probably have answers i don't expect) I was just being difficult and anti-microsoft.

witnesstheday is offline
Reply With Quote
View Public Profile
 
Old 11-25-2008, 02:55 AM Re: Can't pass correct multiple hidden values in form
Average Talker

Posts: 22
Name: Pieter
Why always the pro/anti microsoft
I use php instead of asp because I started with php.
But why always the whinin about how microsoft "sucks".

There's always ups/downs to everything...
Deal with it
elcosmo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Can't pass correct multiple hidden values in form
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13072 seconds with 12 queries