Topic: DOM in a hidden field. (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11107" title="Pages that link to Topic: DOM in a hidden field. (Page 1 of 1)" rel="nofollow" >Topic: DOM in a hidden field. <span class="small">(Page 1 of 1)</span>\

 
Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole in the Ozone
Insane since: Mar 2002

IP logged posted posted 11-26-2003 15:25 Edit Quote

Is there anyway of recieving an XML document, modifying it with Javascript (appending, deleting tags etc...) and then sending the whole thing back to the server where it can be stored in a database?

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

IP logged posted posted 11-26-2003 15:41 Edit Quote

Maskkkk: Though I haven't done it so far, I'm pretty sure it's possible. I remember to have already manipulated an XML via the DOM and its innerHTML so it seems quite feasible to load/create an XML document, alter it and send it in POST ( not in GET because of the 4Kb limits ) via a form.

Some documentation about how to Import XML Document are available at the old site of Peter-Paul Koch. Cancel the prompt at loading 'coz that page hasn't been ported to his new site. His page have all the infos you need, and if you want to learn more you can use it as a good starting point.

Hope that helps,

Mathieu "POÏ" HENRI

Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole in the Ozone
Insane since: Mar 2002

IP logged posted posted 12-05-2003 01:27 Edit Quote

Say you think it could be done through a java applet?



- Biggie

- Face the Present
- AIM: MASKKKK

01001101011000010111001101101011011010110110101101101011

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

IP logged posted posted 12-05-2003 01:45 Edit Quote

No, I say it can be done in JavaScript. Indeed I've already done that except that I hadn't sent the altered XML to a form but changing the value of form field is not the most difficult thing on earth.

Once the XML document is loaded, you can use all the functions of the DOM with it.
As a great man said once : "Play, fiddle, learn".
Really, the page at PPK's site solves the mos fuzzy part. For the rest, alter the DOM of the XML document at will, then onsubmit of your form set the value of an hidden field with the innerHTML of you XML object and voilà.

Anyway, if you need more help, you know where to ask
Cheers,

NB: AFAIK that kind of thing is only possible with IE6 and MOZILLA

Mathieu "POÏ" HENRI

Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole in the Ozone
Insane since: Mar 2002

IP logged posted posted 12-17-2003 08:53 Edit Quote

Ohhh...so that's how ya do it......

Ok sounds kinda how like .net must work, they give you that big ugly hidden field that has the controls and their values.

Thanks man, that's what I was trying to figure out.



- Biggie

- Face the Present
- AIM: MASKKKK

01001101011000010111001101101011011010110110101101101011



Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu