text box problem with safari

L

Limbo

Hi,

Using the following code to fill a specific text box on a form with an image
file name. The code is called from a pop up window, fills a text box on the
partent window and then the pop up window is closed.

function pickImage(theImageName,theTextBoxName) {
window.opener.document.getElementById(theTextBoxName).value = theImageName;
self.close();
}

This is working fine on IE 6, but not safari. What do I need to change to
get the code working on safari?

Limbo
 
S

Scott

I have used the following code and it works on:

PC - IE,Opera,FireFox
MAC - IE,Safari,FireFox

//CODE BEGINS

var myForm = window.opener.document;

function updateFormInfo(myField,myValue)
{
myForm.getElementById(myField).value = myValue;
window.close();
}

//CODE ENDS

Make sure you are passing the correct field; also ensure you are
getting the value by doing a simple alert.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,247
Latest member
crypto tax software1

Latest Threads

Top