| Page 1 of 1 | [ 6 posts ] |
|
Hi everyone,
I started using YUI3 a few days ago. Everything seems to be working fine until I ran into this issue. I am trying to set up a tabview with existing several forms (as markups). I was able to get this working fine on FF, Chrome, but not on IE. On IE, the tabview is rendered correctly but the form submission is not working. Briefly, the structure of the simplified code looks as follows: Code: <script type="text/javascript"> YUI().use('tabview', function(Y) { var tabview = new Y.TabView({srcNode: '#tabName'}); tabview.render();}); </script> <div id="tabName"> <ul> <li><a href='#a'>A</a></li> <li><a href='#b'>B</a></li> <li><a href='#c'>C</a></li> </ul> <div id='a'> <!-- this is the part that is not working. It shows up fine but submission of the form does not work. Once I remove the table element, then it starts working. --> <form> <table><tr><td><input name='submit' value='Submit' type='submit' /></td></tr></table> </form> </div> <div id='b'><p>test</p> </div> <div id='c'><p>test</p> </div> </div> Is there any reason that this shouldn't work on IE? Thank you so much for your help! -- Hi-Tae |
Marco AsbreukYUI Contributor
|
Hey Hi-Tae,
Could you perhaps show the whole code? It seems very unlikely it has to do with tabview. More like you have html-errors: IE is very sticky to that while other browser correct some html-errors. That might be a reason. But I've got to see the whole code. Regards, Marco. |
|
Dear Marco,
Thank you for looking into the problem. I created a test file as follows: Code: <!DOCTYPE html> <html> <head> <meta charset='UTF-8'> <link rel="stylesheet" href="/yui/build/tabview/assets/tabview.css" type="text/css"> <script type="text/javascript" src="/yui/build/yui/yui-min.js"></script> </head> <body> <script type="text/javascript"> YUI().use('tabview', function(Y) { var tabview = new Y.TabView({srcNode: '#tabName'}); tabview.render();}); </script> <div class='yui3-skin-sam'> <div id='tabName'> <ul> <li><a href='#A'>A</a></li> <li><a href='#B'>B</a></li> <li><a href='#C'>C</a></li> </ul> <div> <div id='A'><p> <form action="work.php"> <table><tr><td> <input name="test" value="Submit" type="submit" /> </td></tr></table> </form> </p></div> <div id='B'><p>test</p></div> <div id='C'><p>test</p></div> </div> </div> </div> </body> </html> It still doesn't work on IE. Again, thank you for looking into the problem. Regards, Hi-Tae |
|
Dear Marco,
Thank you for looking into the problem. I created a test file as follows: <!DOCTYPE html> <html> <head> <meta charset='UTF-8'> <link rel="stylesheet" href="/yui/build/tabview/assets/tabview.css" type="text/css"> <script type="text/javascript" src="/yui/build/yui/yui-min.js"></script> </head> <body> <script type="text/javascript"> YUI().use('tabview', function(Y) { var tabview = new Y.TabView({srcNode: '#tabName'}); tabview.render();}); </script> <div class='yui3-skin-sam'> <div id='tabName'> <ul> <li><a href='#A'>A</a></li> <li><a href='#B'>B</a></li> <li><a href='#C'>C</a></li> </ul> <div> <div id='A'><p> <form action="work.php"> <table><tr><td> <input name="test" value="Submit" type="submit" /> </td></tr></table> </form> </p></div> <div id='B'><p>test</p></div> <div id='C'><p>test</p></div> </div> </div> </div> </body> </html> It still doesn't work on IE. Again, thank you for looking into the problem. Regards, Hi-Tae p.s. just realized I can reply to your post...sorry if you have already read my response. |
Marco AsbreukYUI Contributor
|
Hey Hi-Tae,
You embeded your <form> within <p>-elements. When you remove these, it should work. IE is very strict in using html-code the right way. You can check your html at http://validator.w3.org/. What happens in other browsers, is that the <p> tage before the <form> tag is replaced by <p></p> automaticly. Same for </p> after the </form>, which is replaced by <p></p> as well. This way those browsers manage to get it worked even if the html isn't right. This code should work: Code: <!DOCTYPE html> <html> <head> <meta charset='UTF-8'> <link rel="stylesheet" href="/yui/build/tabview/assets/tabview.css" type="text/css"> <script type="text/javascript" src="/yui/build/yui/yui-min.js"></script> </head> <body> <script type="text/javascript"> YUI().use('tabview', function(Y) { var tabview = new Y.TabView({srcNode: '#tabName'}); tabview.render();}); </script> <div class='yui3-skin-sam'> <div id='tabName'> <ul> <li><a href='#A'>A</a></li> <li><a href='#B'>B</a></li> <li><a href='#C'>C</a></li> </ul> <div> <div id='A'> <form action="work.php"> <table><tr><td> <input name="test" value="Submit" type="submit" /> </td></tr></table> </form> </div> <div id='B'><p>test</p></div> <div id='C'><p>test</p></div> </div> </div> </div> </body> </html> |
|
Thank you so much!
That solved my problem! Regards, Hi-Tae |
| Page 1 of 1 | [ 6 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group