Solved

Hidden frame used to process form data

Posted on 2006-11-27
3
206 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
  • 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

Title # Comments Views Activity
xml xsd validation free tool to download 10 92
Microsoft Edge 9 103
How to write an English digest paper 6 72
Create animated movies for web page 18 85
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

837 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