Solved

lost form variables in Safari

Posted on 2006-10-25
10
200 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
 
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

16 Experts available now in Live!

Get 1:1 Help Now