Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

lost form variables in Safari

Posted on 2006-10-25
10
Medium Priority
?
218 Views
Last Modified: 2013-12-24
I have a very simple html form.  When the form goes to the action page the browser generates a ColdFusion error telling me that the form variable does not exist.  I know for a fact that it does because the database update that takes place on the action page runs perfectly and the form information is added to the database, but for some unkown reason Safari says that the variable does not exist.

This error is only occuring on the Macintosh running OS X, Safari 2.2.  Every major browser on the PC platform works fine as does FireFox for the Mac.

I am completely dumbfounded, any insight would be appreciated.

0
Comment
Question by:xamian
10 Comments
 
LVL 36

Expert Comment

by:SidFishes
ID: 17804713
we'll probably need to see some code
0
 
LVL 4

Expert Comment

by:Oneiroid
ID: 17805351
Please post your form code, update code, and code causing the error.
0
 
LVL 1

Author Comment

by:xamian
ID: 17805615
***The form***
<form action="index.cfm?Trg=6&session_id=#url.session_id#" method="post" enctype="multipart/form-data">
<input name="product_id" type="hidden" value="#Trim(product_id)#" />
<select name="qty">
<cfloop index="TheQty" from="1" to="20">
<option value="#Trim(TheQty)#">#TheQty#</option>
</cfloop>
</select>
<input name="" type="submit" value="Update" style="font-size:9pt;" />
</td>
</form>
***/The form***

***The Action Page***
<cfquery name="UpdateQty" datasource="#appdsn#">
UPDATE shopping_cart_tbl SET qty = #Trim(Form.qty)#
WHERE session_id = '#url.session_id#' AND product_id = #Trim(Form.product_id)#
</cfquery>
<cflocation url="index.cfm?Trg=4&session_id=#url.session_id#">
***/The Action Page***

The error basically says #Form.qty# cannot be found.  The update actually takes place, but the page says the variable doesn't exist.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:Oneiroid
ID: 17805685
Is the Action Page the same page that contains your update code?

Please post your update code since that does seem to work for you.
0
 
LVL 4

Expert Comment

by:Oneiroid
ID: 17805694
Sorry, my error. Update code is pasted. You mentioned above that the update worked, but you received an error later on: that is the code I mean to ask for. Is that correct?
0
 
LVL 4

Expert Comment

by:Oneiroid
ID: 17805746
If Safari doesn't recognize your *update*, and that is where the error is occuring, it may be sensitive to the capital 'F' in Form.qty (and if so, will be to your other form variables too) - I can't test this right now but I can't see anything else that should effect that code.

0
 
LVL 1

Author Comment

by:xamian
ID: 17805777
Never mind guys I just solved it.

Apparently safari doesn't like it when you use a relative link in the CFLOCATION tag.

after I changed:
<cflocation url="index.cfm?Trg=4&session_id=#url.session_id#">
to
<cflocation url="https://www.mywebsite.com/index.cfm?Trg=4&session_id=#url.session_id#">
It looks like safari needed the full path.  I'm not getting the errors I was encountering before.

Thanks for trying.
0
 
LVL 4

Expert Comment

by:Oneiroid
ID: 17805797
Please submit a request to close this question and refund points.
0
 
LVL 1

Accepted Solution

by:
kodiakbear earned 0 total points
ID: 17847085
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Integration Management Part 2
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

916 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