paldie
asked on
jQuery UI Tabs not Tabbing 1 div
I have a set of jQuery Tabs that as far as I can remember worked a few days ago, but now they don't. In the code you will see all of my tabs. What is happening is that the variations tab is not becoming it's own tab. The link is built in the nav, but the data within the div displays on all of the other tabs.
Also (and this may be caused by the variations tab), if I navigate directly to a tab with the url by appending #seo for example to the URL I get the data tab. So I get the tab just before the one specified. This only happens when I use the url variable though. I have a feeling this is something really simple like a tag not closed, or something.
The attached code is my tab interface. The screenshot is an example of what I see when I run the code. You can see that even though I am on the images tab it is displaying the variations content.
Also (and this may be caused by the variations tab), if I navigate directly to a tab with the url by appending #seo for example to the URL I get the data tab. So I get the tab just before the one specified. This only happens when I use the url variable though. I have a feeling this is something really simple like a tag not closed, or something.
The attached code is my tab interface. The screenshot is an example of what I see when I run the code. You can see that even though I am on the images tab it is displaying the variations content.
<div class="formBlock #local.windowClass#" id="tabs">
<ul>
<li><a href="##general">General</a></li>
<li><a href="##data">Data</a></li>
<li><a href="##seo">SEO (Meta Info)</a></li>
<li><a href="##links">Links</a></li>
<li><a href="##variations">Variations</a></li>
<li><a href="##images">Images</a></li>
<li><a href="##downloads">Downloads</a></li>
</ul>
<div id="general">
<label for="prodName">Product Name</label>
<input type="text" class="text long :required :only_on_blur" name="prodName" id="prodName" /><br />
<label for="tagline">Tagline</label>
<input type="text" class="text long" name="tagline" id="tagline" /><br />
<label for="description" style="text-align:left; ">Description</label>
<textarea name="description" class="wysiwyg"></textarea><br />
<label for="tags">Tags</label>
<input type="text" class="text long" name="tags" id="tags" /><br />
<span class="help-text">(Comma Seperated)</span><br />
</div>
<div id="data">
<label for="active">Status</label>
<select name="active" id="active">
<option value="true">Enabled</option>
<option value="false">Disabled</option>
</select><br />
<label for="sku">SKU</label>
<input type="text" class="text long :required :only_on_blur" name="sku" id="sku" /><br />
<label for="ourPrice">Price</label>
<input type="text" class="text long :required :only_on_blur" name="ourPrice" id="ourPrice" /><br />
<label for="retailPrice">Retail Price</label>
<input type="text" class="text long" name="retailPrice" id="retailPrice" /><br />
<span class="help-text">(Price other retailers are selling the product for)</span><br />
<label for="taxclass">Tax Class</label>
<select name="taxclass" id="taxclass">
<option value="0">--- None ---</option>
<option valeu="normal">State Taxes</option>
</select><br />
<label for="inventory">Inventory</label>
<input type="text" class="text long :integer" name="inventory" id="inventory" /><br />
<span class="help-text">(Used to manage product availability)</span><br />
<label for="show0">Show if no Inventory</label>
<input type="checkbox" checked="checked" name="show0" id="show0" /><br />
<label for="dateAvailable">Date Available</label>
<input type="text" class="datePicker long" name="dateAvailable" id="dateAvailable" value="#RC.getProduct.dateAvailable#" /><br />
<label>Dimensions</label>
<input type="text" class="text mini" name="length" id="length" /> <input type="text" class="text mini" name="width" id="width" /> <input type="text" class="text mini" name="height" id="height" /><br />
<span class="help-text">(L x W x H)</span><br />
<label for="weight">Weight</label>
<input type="text" class="text long" name="width" id="width" /><br />
</div>
<div id="seo">
<!--- Elements Here:
- Meta Description
- Meta Keywords
--->
<label for="metadesc" style="vertical-align:top; ">Description</label>
<textarea name="metadesc" class="medium"></textarea><br />
<label for="metakey">Keywords</label>
<input type="text" class="text long" name="metakey" id="metakey" /><br />
</div>
<div id="links">
<input type="hidden" name="catLinks" id="catLinks" value="#RC.getParent.catid#" />
<!--- Elements Here:
- Categories
- Related Products
--->
<label for="findCats">Find Categories</label>
<input type="text" class="text long" name="findCats" id="findCats" />
<input type="button" name="searchCats" id="searchCats" value="Search" onclick="searchCats($('##findCats').val(),'sCatResults','addcatLink')" /><br />
<ul id="sCatResults"></ul><br />
<label for="selectCat">Available Categoies</label>
<select name="selectCat" id="selectCat">
<cfloop query="RC.getCategories">
<cfif RC.parent NEQ RC.getCategories.catid><option value="#RC.getCategories.catid#">#RC.getCategories.title#</option></cfif>
</cfloop>
</select>
<input type="button" name="addCat" id="addCat" value="Add Link" onclick="addCatLink($('##selectCat').val());moveOption('##selectCat','##cCatLinks','option');" /><br />
<label for="cCatLinks">Current Category Links</label>
<select name="cCatLinks" id="cCatLinks" size="10" class="text long">
<option value="#RC.getParent.catid#">#RC.getParent.title#</option>
</select>
</div>
<div id="variations">
<!--- Elements Here:
- List of variations
- Add Variation
--->
<input type="hidden" name="variationIDs" id="variationIDs" value="1" />
<p>Click the plus button to start adding variations to your product.</p>
<p><a href="javascript:openWindow(400,600,'#buildURL('variations.addproduct','?windowmode=true')#','add-variation');"><img src="/assets/system-images/icons/add_tiny.png" border="0" /> New Variation</a></p>
</div>
<div id="images">
<input type="hidden" name="imgIDs" id="imgIds" value="" />
<input type="hidden" name="defaultImg" id="defaultImg" value="" />
<div id="imgUploader">
<p>Please select images to upload. Uplaod will begin as soon as you click Upload Image.</p>
<p id="uploadify-message" class="ui-corner-all" style="display: none;"></p>
<div id="uploadify" class="images"></div><p />
<input type="button" onClick="jQuery('##uploadify.images').uploadifyUpload()" value="Upload Image" />
</div>
<div id="prodImgs">
<!--- Format to follow:
<div class="product-img" id="img#imgid#">
<img src="{imgSource}" />
<a href="##" onClick="setDefaultImg(#imgid#)">Set Default</a>
</div>
--->
</div>
</div>
<div id="downloads">
<input type="hidden" name="downloadIDs" value="1" />
<div id="fileUploader">
<p>Please select files to upload. Upload will begin as soon as you click Upload File.</p>
<p id="uplaodify-message" class="ui-corner-all" style="display:none;"></p>
<div id="uploadify" class="downloads"></div>
<input type="button" onclick="jQuery('##uploadify.downloads').uploadifyUpload()" value="Upload File" />
</div>
</div>
</div>
Screenshot.png
can u upload de js files and the css lines???
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Paste the code above into a blank HTML document. Then copy and paste it into the w3c validator... there are 21 errors.
You have multiple IDs
misspelled attributes (ex: valeu)
missing attributes ('row' required on textarea)
missing tags (LI required inside a UL)
invalid (X)HTML tags... make sure your documnet uses the right DOCTYPE and appropriate xmlns for your non-standard tags.
You have multiple IDs
misspelled attributes (ex: valeu)
missing attributes ('row' required on textarea)
missing tags (LI required inside a UL)
invalid (X)HTML tags... make sure your documnet uses the right DOCTYPE and appropriate xmlns for your non-standard tags.
ASKER
None of those would cause the problem I am having. They have been like that all along.
try changing this:
<ul>
<li><a href="##general">General</ a></li>
<li><a href="##data">Data</a></li >
<li><a href="##seo">SEO (Meta Info)</a></li>
<li><a href="##links">Links</a></ li>
<li><a href="##variations">Variat ions</a></ li>
<li><a href="##images">Images</a> </li>
<li><a href="##downloads">Downloa ds</a></li >
</ul>
for:
<ul>
<li><a href="#general">General</a ></li>
<li><a href="##data">Data</a></li >
<li><a href="#seo">SEO (Meta Info)</a></li>
<li><a href="#links">Links</a></l i>
<li><a href="#variations">Variati ons</a></l i>
<li><a href="#images">Images</a>< /li>
<li><a href="#downloads">Download s</a></li>
</ul>
<ul>
<li><a href="##general">General</
<li><a href="##data">Data</a></li
<li><a href="##seo">SEO (Meta Info)</a></li>
<li><a href="##links">Links</a></
<li><a href="##variations">Variat
<li><a href="##images">Images</a>
<li><a href="##downloads">Downloa
</ul>
for:
<ul>
<li><a href="#general">General</a
<li><a href="##data">Data</a></li
<li><a href="#seo">SEO (Meta Info)</a></li>
<li><a href="#links">Links</a></l
<li><a href="#variations">Variati
<li><a href="#images">Images</a><
<li><a href="#downloads">Download
</ul>
ASKER
I need the double pound signs there. ColdFusion uses pound signs for variables within a document, and when it comes across a double pound sign it knows to just replace that with a single one. If I just put a single pound sign it will error out.
upps...
for this sorry:
for:
<ul>
<li><a href="#general">General</a ></li>
<li><a href="#data">Data</a></li>
<li><a href="#seo">SEO (Meta Info)</a></li>
<li><a href="#links">Links</a></l i>
<li><a href="#variations">Variati ons</a></l i>
<li><a href="#images">Images</a>< /li>
<li><a href="#downloads">Download s</a></li>
</ul>
for this sorry:
for:
<ul>
<li><a href="#general">General</a
<li><a href="#data">Data</a></li>
<li><a href="#seo">SEO (Meta Info)</a></li>
<li><a href="#links">Links</a></l
<li><a href="#variations">Variati
<li><a href="#images">Images</a><
<li><a href="#downloads">Download
</ul>
alright dude, I have done this a long time... and I don't appreciate being insulted.
There are currently 21 potential issues that might cause this error. FIX THEM!
Please, take our advice instead of question it. You might end up a better person for it.
Can you please post the rendered code... as in pull up the page in a browser, view source, copy, and paste the code here. Seeing your CFM file does not help us at all.
Here's how it shows up in my browser, except I took 5 minutes and fixed all the validation errors.
screenshot.png
There are currently 21 potential issues that might cause this error. FIX THEM!
Please, take our advice instead of question it. You might end up a better person for it.
Can you please post the rendered code... as in pull up the page in a browser, view source, copy, and paste the code here. Seeing your CFM file does not help us at all.
Here's how it shows up in my browser, except I took 5 minutes and fixed all the validation errors.
screenshot.png
The asker did not respond to suggestions, nor did he follow the advice given. We cannot fix errors that might be caused by other errors. I took it upon myself to fix all of the other errors and tested the SAME EXACT CODE pasted above... with the errors fixed. AFTER FIXING THE 21 ERRORS, IT WORKED, and I proved it with screenshots. I cannot help that the asker did not respond to my suggestions.
ASKER
I never meant to offend you. I did eventually fix the errors in my own and it still did not work. I eventually did find a problem with the ColdFusion code that caused the problem, and I apologize for not posting the solution to it.
@paldie - No worries. If you fixed it, good. It's just a common courtesy to not leave us out there hanging. We are here to help, and it is very frustrating when askers become unresponsive and/or don't follow our advice. Your reason for closing the question should have been more along the lines of "problem in my CF code, fixed it myself" as opposed to implying that we did not offer a proper solution.
@Moderator - you may close this question without awarding points. My objection was to the reason behind closing the question. The asker solved the problem himself, therefore no points need to be awarded.
@Moderator - you may close this question without awarding points. My objection was to the reason behind closing the question. The asker solved the problem himself, therefore no points need to be awarded.