Solved

lost form variables in Safari

Posted on 2006-10-25
10
208 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
[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
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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

636 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