Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Hidden frame used to process form data

Posted on 2006-11-27
3
Medium Priority
?
213 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 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

609 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