driveflexfuel
New Member
- Messages
- 159
- Reaction score
- 0
- Points
- 0
I have been trying to get this to work in IE without any luck. It works great in FF, Opera, and Safari. If anyone can give me a hand with this I would appreciate it.
The following code loads is looped to add the onsubmit function and name to all my paypal forms currently being 30 per page. Before you all ask this is being created as a plugin so i can not just edit the buttons by hand.
I have been playing further and it seems that IE is not responding to any of the dynamic functions I am using. I also created a text box that i fill in and i receive the error "document.pp_form1.text.value is null or not an object."
Is there a special method for IE. I will list the entire script below.
The following code loads is looped to add the onsubmit function and name to all my paypal forms currently being 30 per page. Before you all ask this is being created as a plugin so i can not just edit the buttons by hand.
I have been playing further and it seems that IE is not responding to any of the dynamic functions I am using. I also created a text box that i fill in and i receive the error "document.pp_form1.text.value is null or not an object."
Is there a special method for IE. I will list the entire script below.
Code:
function create_page(){
var frm_count = document.forms.length;
alert(frm_count);
var i = 0; var x = 1;
while (i<=frm_count-1){
var frmName = document.forms[i];
alert('form'+i);
if(frmName.amount != null && frmName.item_name != null){
alert('entered form creation');
//frmName.setAttribute('onsubmit',"this.target = 'paypal'; return ReadForm(this);");
frmName.setAttribute('name','pp_form'+x);
//Create Multi value if needed
if(frmName.multi == null){
var element1 = document.createElement("input");
element1.setAttribute("type", 'text');
element1.setAttribute("value", '0');
element1.setAttribute("name", 'multi');
frmName.appendChild(element1);
}
//Create Base Amount
if(frmName.amount != null){
var element2 = document.createElement("input");
element2.setAttribute("type", 'text');
element2.setAttribute("value", frmName.amount.value);
element2.setAttribute("name", 'baseamt');
frmName.appendChild(element2);
}
//Create Base Description
if(frmName.item_name != null){
var element3 = document.createElement("input");
element3.setAttribute("type", 'text');
element3.setAttribute("value", frmName.item_name.value);
element3.setAttribute("name", 'basedes');
frmName.appendChild(element3);
}
x++;
}
i++;
}
}
window.onload = function(){
create_page();
};
Last edited: