[webkit-dev] accessing forms using document."form-name". causescrash in XHTML file
Deshpande, Raghavendra
raghavendra.deshpande at philips.com
Thu Nov 20 03:01:20 PST 2008
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: webkit-dev-bounces at lists.webkit.org [mailto:webkit-dev-bounces at lists.webkit.org] On Behalf Of Deshpande, Raghavendra
Sent: Thursday, November 20, 2008 3:27 PM
To: webkit-dev at lists.webkit.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081120/6fa053f4/attachment-0002.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081120/6fa053f4/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forms_test.xhtml
Type: application/octet-stream
Size: 768 bytes
Desc: forms_test.xhtml
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20081120/6fa053f4/attachment-0001.obj>
More information about the webkit-dev
mailing list