Jump to content

Change PHP variable with AJAX/Javascript?


capnH00K

Recommended Posts

Basicly i have 2 variables

- $dir

- $link

 

$dir has a default set - so that it 'opens' a folder (runs through it and list everything inside it - like a folder in windows)... Inside this folder, there can be other folders - so when there's a folder inside the default $dir .. i'm creating a link which should then change the default $dir to the new one - so you kinda "opens" a new dir... it just has to work as the exploded in windows... If you press a folder you open that ...

 

 

Does that make sence?

Link to comment
Share on other sites

:shrug:

 

Okay, man i can't get this to work... !

 

Can you just tell me exacly what to type on the the  " // everything from here is brought back from echo in php" line. And what to type in the html/php part to make it resive the php variable...

 

function processNav() {

// everything from here is brought back from echo in php

$('mydiv').innerHTML = req.responseText;

}

 

 

Thanks :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.