| Issue 47: | base tag breaks DOM Element (hidden div) from working | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. include a base tag in your html (make sure the path is correct) example: <base href="C:\Documents and Settings\wac84s\Desktop\dump\jquery\nyromodal\nyroModal-1.2.8 \pass_params\" ></base> 2. paste this code onto the page <a href="#test" class="nyroModal">DOM Element (hidden div)</a> <div id="test" style="display: none; width: 600px;"> <a href="demoSent.php" class="nyroModal">Open a new modal</a><br /> Test </div> 3. click the link 'DOM Element (hidden div)' What is the expected output? What do you see instead? The content of the div in the modal should appear but it says cannot be found. this is because it takes what ever the url is in the base tag, for example: www.google.com and then inserts the '#test' so you get 'www.google.com#test' which is wrong if your page is for example should be: www.google.com/helloworld.jsp#test What version of the product are you using? On what operating system? nyroModal-1.2.8 Windows IE 6 Please provide any additional information below. See attached file for reproduction and my fix using the urlplugin. I image you would want to fix this in the core, but I just wanted to demonstrate the issue. NOTE: I left in some alerts so you can see what is happening When you run the 'no_base_tag.html' the type setting is '#test' When you run the 'base_tag.html' the type setting is 'undefined'
Jul 14, 2008
Project Member
#1
william....@gmail.com
Jul 23, 2008
you can use php to fix that. eg. href="<?php print $self ;?>#" where $self = $_SERVER['REQUEST_URI'];
Jan 26, 2009
After a small investigation, I think nyroModal works properly. Maybe not the way you excpeted, but properly, regarding what you've done. Here is some explanations : NO BASE TAG In the page http://domain.com/page.html I'm using nyromodal. In a nyroModal link, I'm using the href="#div" which means the full URL will be http://domain.com/page.html#div It's working great and the content is shown through DOM element. WITH BASE TAG In the page http://domain.com/page.html I'm using nyromodal. I'm also writing <base href="http://domain.com/"></base> In a nyroModal link, I'm using the href="#div" which means the full URL (with the base tag) will be http://domain.com/#div So nyroModal detects it's not the same page and load the page trhough an Ajax call. It seems pretty logiciel to me, isnt'it? So, as Ephcj said, you should write href="page.html#div" for your link. It'll make nyroModal work and the link will be again the good one. For this reason, this bug (which is not one to me) won't be fixed.
Status:
WontFix
Labels: -Type-Defect Type-Other |