Hello,

Sorry, I pasted the wrong code...
If we use, document.forms.MyForm.  , it crashes.

But, With the following content, it doesn't crash.. and It doesn't work either.
If the same content is served as  .html, the form submit works.

Please find the attached test files.

Raghu




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Deshpande, 
Raghavendra
Sent: Thursday, November 20, 2008 3:27 PM
To: [email protected]
Subject: [webkit-dev] accessing forms using document."form-name". causescrash 
in XHTML file

Hi All,


  I have pasted the test content below.

If this content is present in a .xhtml file, the webkit crashes. (Verified in

Safari on Win XP with latest nightly, and in Chrome - It crashes there too.)



But, if the same content is served in a .html file, It works fine.



I am afraid, the XHTML content <--> JS bindings have serious issues in webkit.



I have filed this as a bug in https://bugs.webkit.org/show_bug.cgi?id=22378



Any suggestions/patches to get it working in .xhtml ??





Here's the test content:

-------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC

"-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

<head>

<meta http-equiv="content-type" content="application/xhtml+xml;

charset=UTF-8"/>

<title>Form access </title>

</head>

<body

style="background-color:white;border-left:0px;border-top:0px;overflow:hidden;"

>

<form name="MyForm" method="POST" action="about:blank">

<input type="hidden" name="name" value=""></input>

</form>



<script type="text/javascript">

document.MyForm.name.value="test";

document.MyForm.setAttribute("action","about:blank");

document.MyForm.submit();

</script>

</body>

</html>

------------------------------------------------------------------

Raghavendra Deshpande


________________________________
The information contained in this message may be confidential and legally 
protected under applicable law. The message is intended solely for the 
addressee(s). If you are not the intended recipient, you are hereby notified 
that any use, forwarding, dissemination, or reproduction of this message is 
strictly prohibited and may be unlawful. If you are not the intended recipient, 
please contact the sender by return e-mail and destroy all copies of the 
original message.
Title: Form access

Attachment: forms_test.xhtml
Description: forms_test.xhtml

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to