Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6750673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:50:07+00:00 2026-05-26T12:50:07+00:00

This next challenge of mine involves jqtransform which can be found here http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/ I

  • 0

This next challenge of mine involves jqtransform which can be found here
http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/

I have a dropdownlist, and its items are populated using the function buildSelect1() which is located in the <head> of the page (special thanks to Brian Glaz for writing such a wonderful script at write labels for <option> tags based on selectedIndex using JavaScript)

The <select> box is being styled using the popular jqTransform plugin for jQuery. There seems to be a bug in it however. When using jqTransform, it seems that elements being styled by it (or perhaps just dropdownlists) can not be empty.

To demonstrate this, I have the below sandbox page: (if testing you’ll need to download jqTransform, and put the file “jqtransform.css” in a folder called “css” and the file “jquery.jqtransform.js” in a folder called “jquery”, the jquery library is linked from https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js)

<!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="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />

<title>Title Drop</title>

<link rel="stylesheet" href="css/jqtransform.css" type="text/css" media="all" />

<script type='text/javascript'> 
//<![CDATA[ 
//hosts labels or "titles" of templates
function buildSelect1() {
var labels = ["Please select a template...",
              "Head Option 1",
              "Head Option 2",
              "Head Option 3",
              "Head Option 4",
              "Head Option 5",
              "Head Option 6",
              "Head Option 7",
              "Head Option 8",
              "Head Option 9"
         ];

        for(var i=0; i<labels.length; i++) {
            var selectBox = document.getElementById('foo');
            var newOption = document.createElement('option');
            newOption.label = labels[i];
            newOption.innerHTML = labels[i];
            newOption.value = labels[i];
            if(i==0) { newOption.setAttribute('selected','selected'); }
            selectBox.appendChild(newOption);
        }
    }
showSelectedTemplate = function(elem) {
   var selectedTemplate = elem.options[elem.options.selectedIndex].value;
    alert(selectedTemplate);
}
//]]> 
</script>
<script type='text/javascript'>
//<![CDATA[ 
window.onload=function()
{
buildSelect1();
}
//]]> 
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>

<script type="text/javascript" src="jquery/jquery.jqtransform.js">
</script>

<script type="text/javascript">
//<![CDATA[ 
              $(function(){
                    $('form.test').jqTransform({imgPath:'jqtransformplugin/img/'});
            });
//]]>
</script>
</head>
<body>
<form class="test">
<p>

    <select id="foo" class="c10"> <!--toggle class="test" to show the problem -->
              <option>Please select a template...</option>
    <option>body option 1</option>
    </select>
</p>
If you disable jqtransform (simplest way is to remove class="test" from < form >) you'll see the dropdown list populates using both the option tags as well as the buildSelect1() function in the head of the page. But if jqtransform is enabled, the dropdown list will not populate using the buildSelect1() function, the only items that will appear will be the option tags    
</form>
<form class="test">
<p>

    <select id="foo" class="c10">

    </select>
</p>
</form>
If you leave a jQtransform enabled < select > box empty (i.e. no < option > tags assigned) when you click on it you'll see the following error:
<br /><br /><br />
<i>
<pre>
Webpage error details

Timestamp: Sun, 4 Sep 2011 16:24:36 UTC


Message: 'offset().top' is null or not an object
Line: 298
Char: 7
Code: 0
URI: file:///H:/New%20OLH%20Project/Note%20Generator/jquery/jquery.jqtransform.js

</pre>
</i>
<br /><br />Hopefully if the bug can be fixed, the final result should look like this:
<p>
<form class="test">
<p>
    <select id="foo" class="c10">
              <option>Please select a template...</option>
    <option>head option 1</option>
    <option>head option 2</option>
    <option>head option 3</option>
    <option>head option 4</option>
    <option>head option 5</option>
    <option>head option 6</option>
    <option>head option 7</option>
    <option>head option 8</option>
    <option>head option 9</option>
    </select>
</p>
</form>
</p>
</body>
</html>

I’ve searched all over the forums, as there seems to be a few “bugs” with jqtransform, and most have been solved by either adding new functions or replacing existing functions, but so far I have not found a solution to this problem.

Any clues?

Thanks very much in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:50:08+00:00Added an answer on May 26, 2026 at 12:50 pm

    I had similar issue today. I resolved it with following code (line 250):

              if ($select.hasClass('jqTransformHidden')) { return; }
                if ($select.attr('multiple')) { return; }
    
                var oLabel = jqTransformGetLabel($select);
                /* First thing we do is Wrap it */
                var $wrapper;
                if (!$select.hasClass('jqNeedsUpdate')) {
                    $wrapper = $select
                    .addClass('jqTransformHidden')
                    .wrap('<div class="jqTransformSelectWrapper"></div>')
                    .parent()
                    .css({ zIndex: 10 - index });
                }
                else {
                    $wrapper = $select.parent();
                    $select.addClass('jqTransformHidden');
                    $wrapper.find('div,ul').remove();
                }
                /* Now add the html for the select */
                $wrapper.prepend('<div><span></span><a href="#" class="jqTransformSelectOpen"></a></div><ul></ul>');
    
                var $ul = $('ul', $wrapper).css('width', $select.width()).hide();            
                /* Now we add the options */
    

    and then after updating select I update dropdown with following code:

    $(destination).removeClass('jqTransformHidden');
    $(destination).addClass('jqNeedsUpdate');
    $(destination).jqTransSelect();
    

    Hope this is still actually for you. Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery which I need adapting: $(document).ready(function(){ $(.rss-popup a).hover(function() { $(this).next(em).stop(true,
This is the real challenge I brings here for you. Solve it if you
I have a challenge - I have created this little concept here . The
here's a little code I wrote. This next class waits for a connection and
$(function() { $(table.section thead).click(function() { if ($(this).next(table.section tbody).style.display == block){ $(this).next(table.section tbody).slideUp(slow); } if
I am using this code: $('.ui-accordion').bind('accordionchange', function(event, ui) { $(this).next().next().css({'background-image':'images/green-bg.jpg'}); //ui.newHeader // jQuery object,
Im using the following JS <a href=# onClick=if($(this).next('div').css('display') == 'none') { $(this).next('div').show('fast'); } else
I have the following function. $(function() { $(.sectionHeader:gt(0)).click(function() { $(this).next(.fieldset).slideToggle(fast); }); $(img[alt='minimize']).click(function(e) { $(this).closest(table).next(.fieldset).slideUp(fast);
What does this mean: Next add reference to: MySql.Data actually I have downloaded mysql
This is an extension / next step of this question I asked a few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.