[jQuery] Noob Q. Can't get jQuery working

2009-01-01 Thread spstieng
Ok, this is a noob questions. I'm using Wordpress and have the following code. In the header I add: script type=text/javascript src=?php bloginfo('template_url'); ?/ js/jquery-1.2.6.js/script script type=text/javascript src=?php bloginfo('template_url'); ?/ js/test.js/script The test

[jQuery] Re: Noob Q. Can't get jQuery working

2009-01-01 Thread spstieng
jQuery is not actually loaded. On Thu, Jan 1, 2009 at 5:26 AM, spstieng wrote: Now, clicking Test B links dislays the 'Hello World' alert. But nothing happends when I click Test A. Why is that?

[jQuery] Re: Noob Q. Can't get jQuery working

2009-01-02 Thread spstieng
(... }); On Jan 1, 7:29 pm, spstieng spsti...@hotmail.com wrote: Tha path is correct. I use FireBug to debug the javascript and I can see the jQuery script executing. I was executing this code inside Wordpress CMS and Drupal CMS. To test further, I created a test site tha only

[jQuery] Re: jQuery.Accordion - how can panels stay open?

2009-01-05 Thread spstieng
...@googlemail.com wrote: http://docs.jquery.com/UI/Accordion#What_this_isn.27t Jörn On Mon, Jan 5, 2009 at 11:30 AM, spstieng spsti...@hotmail.com wrote: I'm successfully using the accordion herehttp://www.norwegianfashion.no (right side below videos). My question is: How can I leave a panel open

[jQuery] jQuery.Accordion - how can panels stay open?

2009-01-05 Thread spstieng
I'm successfully using the accordion here http://www.norwegianfashion.no (right side below videos). My question is: How can I leave a panel open after it's been clicked? If 'Andre lenker' is open and I click 'Designskoler', 'Andre lenker' panel is closed and 'Designskoler' opens. Offcourse I

[jQuery] Highlight table row

2009-04-14 Thread spstieng
I've tested different solutions found in here, and on the web, but I can't get it working. I simply want to highlight a table row. I would like to you toggleClass $(this).parents('tr').toggleClass(highlight); This is my HTML code: html head titleTitle/title link rel=stylesheet

[jQuery] Re: Highlight table row

2009-04-15 Thread spstieng
('highlight');      },      function() {  // mouseout           $(this).removeClass('highlight');      } ); On Apr 14, 11:51 am, spstieng spsti...@hotmail.com wrote:

[jQuery] jQuery.post() not working for me

2009-04-16 Thread spstieng
Hi, I'm trying to use jQuery.post() function to retrieve som data. But i get no ouput. My PHP file looks like this: ?php inlcude_once('dal.php'); //Get store data, and ouput it as JSON. function getStoreInformation($storeID) { $sl = new storeLocator(); $result =

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
(../ functions.php, { func: getStoreInformation, sID: storeID } But I don't think I can use sID: storeID . Steven On 16 Apr, 14:13, Josch jluelsd...@googlemail.com wrote: Do you get an empty alert or nothing? On 16 Apr., 12:13, spstieng spsti...@hotmail.com wrote: Hi, I'm trying to use

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
I haven't figured out how to use this yet. How can I debug a javascript file? I only see the html code from my index.php. (I have lots of experience using debugger tool in Visual Studio) Steven On 16 Apr, 15:19, Donny Kurnia donnykur...@gmail.com wrote: Try running it in firefox with firebug

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
Ah, got it. The Post is correct and the Respons is correct... I think. It's in JSON, but not sure if it's correct. According to http://docs.jquery.com/Ajax/jQuery.post, last example, they have the following line in the php file: ?php echo json_encode(array(name=John,time=2pm)); ? This is why

[jQuery] Re: jQuery.post() not working for me

2009-04-16 Thread spstieng
Ok, I found the answer. It was as simple as doing this: alert(data[0].name); Notice the [0]. So here is the functional code for anyone who is wondering about this: javascript file --- jQuery(document).ready(function() { jQuery('#storeListTable tr').click(function() {

[jQuery] jQuery.ajax form submission to MySQL

2009-05-12 Thread spstieng
Hi guys. I'm using Wordpress CMS where I have created a custom form. I would like to store the input from this form in a database (MySQL). I've posted my problem here: http://stackoverflow.com/questions/852054/store-form-data-in-mysql-with-jquery-ajax , but I think maybe this forum is a better

[jQuery] Autocomplete - Problem accessing php file

2009-05-13 Thread spstieng
Hi, I have the following script in my index.php file: script type=text/javascript var options = { script:get_labels.php?json=true, varname:input, minchars: 2, delay: 200, json:true,

[jQuery] Re: Alternating Row Colors: Last row not coloring

2009-05-13 Thread spstieng
The only js code I use is this: jQuery(#myTable tr:even).addClass(even); Then in my CSS file, I define what background color the .even class will have. Steven On 13 Mai, 22:25, MorningZ morni...@gmail.com wrote: You have --

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-13 Thread spstieng
Alright. I found the problem. In my get_labels.php, I was ?php include 'afile.php' ?. This ahad to change to ../afile.php So now includes/get_labels.php?json=true is working. Now comes the real problem. I need this to work in a template I'm making in Wordpress. So far, it looks lke the main

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng
Progress! The main script (autosuggest) is triggering now in Wordpress. But now I'm having problems getting the script to locate the get_labels.php script. I'm using user friendly urls. My permalink is set up to http://www.mysite.com/ %category%/%postname %. So if I'm reading a post called

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng
It's so fun answering my own posts :) Well, I have dug out this: http://ryanpharis.com/2008/10/ajax-for-wordpress-plugins-using-jquery/ http://amiworks.co.in/talk/simplified-ajax-for-wordpress-plugin-developers-using-jquery/ I will give this a go and see how I progress.

[jQuery] Re: Autocomplete - Problem accessing php file

2009-05-14 Thread spstieng
Alright! After about 20 hours of research, I found the answer in a blog by Ryan Pharis (link above). As I was suspecting, it was an easy solution. Wordpress is using user friendly URLS. Therefore my path ended up like this: http://www.mysite.com/includes/autosuggest.php?json=true; The REAL path

[jQuery] Auto close dialog after 5 seconds ?

2009-09-24 Thread spstieng
Hi. I'm using jQuery.dialog and I'm wondering if it's possible to auto close it after e.g. 5 seconds.