Jump to content
gogi100

load contains of text file in listbox using jquery

Recommended Posts

i have code that is working in chrome and internet explorer but not in firefox

{.if|{.member of|bud.}| 
{:<script type="text/javascript">$(document).ready(function(){ 
$("select").ready(function(){ 
$("#lista").load("/template/pitanja-b.txt"); 
}); 
});</script>:}| 
{.if|{.member of|lok.}| 
{:<script type="text/javascript">$(document).ready(function(){ 
$("select").ready(function(){ 
$("#lista").load("/template/pitanja-l.txt"); 
}); 
});</script>:}|{.if|{.member of|oos.}| 
{:<script type="text/javascript">$(document).ready(function(){ 
$("select").ready(function(){ 
$("#lista").load("/template/pitanja-o.txt"); 
}); 
});</script>:}|{.if|{.member of|jav.}| 
{:<script type="text/javascript">$(document).ready(function(){ 
$("select").ready(function(){ 
$("#lista").load("/template/pitanja-javna_p.txt"); 
}); 
});</script>:}|{.if|{.member of|nbs.}| 
{:<script type="text/javascript">$(document).ready(function(){ 
$("select").ready(function(){ 
$("#lista").load("/template/pitanja-n.txt"); 
}); 
});</script>:} 
/if.} 
/if.} 
/if.} 
/if.} 
/if.} 
{.if| {.get|can upload.} |{: 
<fieldset id='upload'> 
<legend><img src="/~img32"> Пребацивање фајлова</legend> 
<form action="." method='post' enctype="multipart/form-data" style='text-align:center; padding-top:1%;'> 
<div style='text-align:center;'> 
<input type="hidden" name="0" value=""> 
<input type="hidden" name="1" value="pitanje1"> 
<input type="hidden" name="2" value="pitanje2"> 
<input type="hidden" name="3" value="pitanje3"> 
<input type="hidden" name="4" value="pitanje4"> 
<input type="hidden" name="5" value="pitanje5"> 



<select id="lista" name="metodologija" onchange="change(this)" > 

</select> 
</div> 
<br/>	
<div > 
<input disabled id="skriveno" type='file' name='file' multiple /> 
<input type='submit' value='{.!lv_addInput.}' /> 
</div> 
</form> 
</fieldset> 
:}.} 

the contains of one of text file is

<option value="0" selected disabled >Изабери тип</option> 
<option value="1" >Б-Стa</option> 
<option value="2" >Б-Бил</option> 
<option value="3" >Б-Рач</option> 
<option value="4" >Б-Јав</option> 
<option value="5" >Б-Неп</option> 

why this cod is not working in firefox?

 

thanks

Share this post


Link to post
Share on other sites

What language is this? I don't recognize it.

Share this post


Link to post
Share on other sites

hfs http file server programming language.

Which server programming language is that? asp is server programming language and php as well. Can you give a cue about the name of that language and may be we can help you look into it. Edited by Chikwado

Share this post


Link to post
Share on other sites

this code make problem in firefox

 

  1. $(document).ready(function(){
  2. $("select").ready(function(){
  3. $("#lista").load("/template/text_file.txt");
  4. });
  5. });

how i resolve this problem in firefox? this code load contains of text file in listbox in ie and chrome but not in firefox.

Edited by gogi100

Share this post


Link to post
Share on other sites

Using as it is in jQuery, it does work in Firefox, merged with this new scripting language I don't know? by the way this ' $("select").ready(function(){ ' is not correct and not required.

 

$(document).ready(function(){ runs sub coding after page fully rendered so elements exist for manipulation

 

$("#lista").load("/template/text_file.txt"); will load text file between <select>...</selext> with id lista.

 

So

    $(document).ready(function(){
    $("#lista").load("/template/text_file.txt");
    });

is all you require for jQuery.

Share this post


Link to post
Share on other sites

Then try newer version then, as i said it works perfectly using version 1.10 jquery on its own, if it does not work when using it with your scripting language, its not jQuery problem, its how it is used with this scripting language that is the problem.

Share this post


Link to post
Share on other sites

I do not know which language but I have a link

What you see in that link is that you need to lay it aside. Choose a language you know, explain a certain command you want to write and how you have tried but failed. Then we will help you achive the result. Or if you are developing a new language, then It will be extremely difficult that you would get help here. After all, Your new language is not known.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...