|
|||||||
| charles wang |
| (X)HTML, JavaScript, DHTML, XML, CSS Client scripting tehnologije, Dynamic HTML, Cascading Stylesheets, XML i standardi |
![]() |
|
|
Alati teme | Način prikaza |
|
|
#21 |
|
.
Professional
Datum učlanjenja: 04.06.2005
Poruke: 326
Hvala: 0
81 "Hvala" u 72 poruka
![]() |
Nešto kao:
Kôd:
window.onload = function() {
var iframe = document.createElement('iframe');
iframe.src = 'form.html';
iframe.style.display = 'none';
iframe.onload = function() {
var doc = this.contentDocument;
var param1 = doc.getElementById("field1");
param1.value = "Well, I'm new one";
alert(doc.getElementById("field1").value);
var theForm = doc.forms['someCoolForm'];
this.onload = null;
theForm.submit();
}
document.body.appendChild(iframe);
}
__________________
Don't look at me; I'm lost too. “If you can't dazzle them with brilliance, baffle them with bul*s**t.” Poslednja izmena od Br@nkoR : 25. 04. 2012. u 13:29. |
|
|
|
| "Hvala" Br@nkoR za poruku: |
|
|
#22 |
|
Ivan Pavković
Qualified
Datum učlanjenja: 15.01.2007
Lokacija: Beograd
Poruke: 144
Hvala: 42
16 "Hvala" u 16 poruka
![]() |
I da, to je to
![]() Evo kompletnog resenja, mozda nekom zatreba. Kôd:
window.onload = function() {
var url = 'form.html';
var iframe = document.createElement('iframe');
iframe.src = url;
iframe.setAttribute('id', 'ifrm');
iframe.setAttribute('name', 'iframeee');
//iframe.style.display = 'none';
document.body.appendChild(iframe);
frames["iframeee"].onload = function(){
var param1 = window.top.iframeee.document.getElementById("field1");
param1.value = "Well, I'm new one again";
alert(window.top.iframeee.document.getElementById("field1").value);
window.top.iframeee.document.someCoolForm.submit();
};
};
PS ^Pretece me ti ![]() Da, to je to!!!!!!????? Poslednja izmena od centaur : 25. 04. 2012. u 13:29. |
|
|
|
![]() |
| Alati teme | |
| Način prikaza | |
|
|
|||||