Solved

Hidden frame used to process form data

Posted on 2006-11-27
3
207 Views
Last Modified: 2010-04-06
Hi there

I am using a hidden frame to run a PHP page that processes some of the data on the page.

It works perfectly with firefox (and i used firefox to design an test it) but now when its live, I realise that this does not work with Explorer. When I click the button in explorer, it just does nothing. I made the frame bigger to see if the php was actually been sent there when I clicked the button, it does when Im using firefox, but not when Im using explorer.

As the system is already live, i would appreciate it if we could solve this quickly, so any ideas appreciated.

Thanks in advance

the frame:
<iframe id="hiddenframe" width="0" height="0"></iframe>

the button:
<td class="input_label"></td><td align="left"><input type = "button" value = "Email Smoothie" onclick="EmailSmoothie(<?=$myrow['id']?>)"></td>

the script:
function EmailSmoothie(contactid) {

  var name=confirm("Are you sure you want to email this Smoothie?")
            
  if (name==true)
  {
      hiddenframe.src = "email_contact.php?contactid=" + contactid;
  }
  else
  {
      return false;
  }


}

and finally, the PHP:
<?
include('connect.php');
$sql = "UPDATE contact set packageStatus = 4 where id = ".$contactid;
$result = mysql_query($sql) or die(mysql_error());
echo "done";
?>
0
Comment
Question by:AndriesKeun
[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
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 18018808
EITHER use
window.frames["hiddenframe"].location="email_contact.php?contactid=" + contactid;

and add NAME="hiddenframe" to the iframe
OR use the DOM:
document.getElementById('hiddenframe").src="email_contact.php?contactid=" + contactid;

0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 18018815
0
 

Author Comment

by:AndriesKeun
ID: 18018997
it works. thanks, really appreciate it.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

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

Suggested Solutions

When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

749 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