I currently have a form that asks for certain info. When the user enters and then submits it, a javascript script sends the info to a php form and then php does its thing. While doing its thing, php tries to change a php session. I am wondering if there is a way to change the php session, and have it take effect on the user end without a refresh. So if the user has a session for their name (Bob), then goes to this form and changes it to Joe, then session the user has will be changed from Bob to Joe without the page reloading. Is this possible?
I can see that both the javascript.js and javascipt.php files are executing from the web logs, but when I try to query the $_SESSION['javascript'] variable from another page $_SESSION is empty.
Is it possible to create/update a Php Session with Javascript?
Might it be done using URLEncoded URL, Javascript XMLHttpRequest, or something of the like?
I'm presently working on an existing web mapping site written in 'old' asp (not .net) using JavaScript on server side and JavaScript on client.
I'm more familiar with .net and vb, rusty with both 'old' asp and JavaScript so please forgive me if this question is too easy!
I need to set variables from web page tools, (e.g. a combo box) that have been coded in client JavaScript then save those variable back to the server as something like a session or application var. As when the page is refreshed (every time the map is paned for e.g.) I need the selected variable to stay and not have the user have to reset it every time.
I havent posted any code as I dont real know where to start!
I have no problem passing session vars from asp to the page but not collecting data from the page and saving back to server.
what I have is a code containing 2 iframes inside a div.what I'd like to do is refresh one of the iframes when it's page recieves an update from another user.
perhapse I could load the page on the document load, and store those contents in a var.then have a code that will compair the remote page to the var every second or so.if the page compairs differently, update the var info and refresh the iframe.
we are developing an web application. In this user has an option to comment or mark a video. After user commented or marked it has to shown automatically on the page with out refreshing the page.
I'm working on a project which requires a small portion from a large table of information to be displayed on a webpage (sort of like a magnifying glass). The display will be a table of fixed size (m by n cells). Some of the cells will be merged. When the table updates, different sets of cells may be merged.
It needs to be coded in HTML5, which I assume includes the use of JavaScript and CSS (The specs of this is rather unclear at the moment, so I'm going to cover all bases).
Anyhow, looking through the HTML5 and JavaScript tutorials, I found two ways to solve this problem. One way would be to have a script to parse out the relevant information, and have it output into a table (dynamically generating the HTML required).
The second way would be to have the script draw the table on its own in a canvas.
User events (such as arrow keys on the keyboard) will change the position of the focus (move the magnifying glass in a cardinal direction).
I hit a small snag with the first solution - Is it possible to update the table on the page (including changing the structure of it) without having to refresh?
In my jsp,Struts project i am using the javascript calendar control for selecting the date and by using function calcage() i am calculating the age of the user but problem occurs when the page refreshes OR when user updated the other values such as name ,contact no. Then the value of the age is set as 0 in the textfield as 0
[URL]. I looked at this script and I tried playing around with it but could not figure out how to: Instead of having a check box field and then a radio box field, have 2 radio box fields, so the user picks from one group of radio boxes and then another. Then change the math behind it so the values in the first field are multiplied by 100 and then the values in the second field tack on a percentage (ex value in first field is 1.5 so 1.5x100 = 150 and value in second field is .5 so total is 225).
I'm using an xmlhttp request to get information from a database. Everything works fine in Firefox, and it works in IE until you try to refresh the page. If a news post (thats what it is getting from the database) is deleted it will continue to show the same information. I can't really post all of the script because it (along with the html and php) are spread out through many different pages:
I have this code in a page that appears in my iframe if requested from parent:
<script type="text/javascript"> parent.rrr(); </script> The parent code is: function rrr() { javascript:location.reload(true); }
So, the person clicks a link from the parent, it does a php process in a hidden iframe, which then tells the parent page to refresh. The only problem is that it puts Firefox in a constant loop of refreshing. IE and Chrome work fine. They refresh once and stop.
Though the src code opens the iframe like so: <iframe src="" style="display:none; height:1px;" name="hdplus" id="hdplus"></iframe> Firefox seems to refresh the page with the memory of the child page being in the iframe, constantly looping the child request to refresh the parent.
Why won't Firefox just accept that no page should load in the iframe, as stated in the code? I need to stop this loop, which means I need to get firefox to reset the iframe as it reloads the page.
I am having difficulty on maintaining session when using ajax.
I first load a page with a session genterated. But since AJAX is a client side activity where I sent an AJAX request to an url without any session info. Of course, the server will create a new session. Even though I can write the session id into the first page where I made ajax calls, it is not a secure way...
I'm just beginning with JavaScript (and Ajax). My loginscript now works with Ajax - that is; the script is sending a request to the servers PHP script to check username and password, but I wonder what that script should return - and how to use that response. Either XML or pure text: The response is now "false" if the user couldn't log in for some reason, and the users ID and real name if the login went well...
But then the problem: if login IS ok - so that the users ID and real name is returned from the serverscript - I would like to store those variables in a session variable ($_SESSION in PHP). How do I get those variables back to the client script from JavaScript?
I know how to access Server Side Session variable at client side(JS)..But i want to know how to Set Sessin varable at Clinet side(JS) & access its value at Server side.
I know how to access Server Side Session variable at client side(JS)..But i want to know how to Set Sessin varable at Clinet side(JS) & access its value at Server side..
Is there a way to check for to see if the user has session cookies enabled? I know how to check to see if they have cookies in general enabled, but how do you test for just session cookies?
Using window.open(), the exec'd child window shares session information with the parent. Is there a way in JavaScript to exec a new browser window that does not share?
i am working on a java and HTML based web application. now i am storing session variables. is there a way for me to pass on these variables to javascript. what i am getting at is, i need JS to do something based on the user variable.
I had written code which created a shopping cart into an array using vbscript and then transferred the information into a session variable. However what I didn't know was that deleting/manipulating information in an array using vbscript was not that easy.
In doing some reading and research it seemed that js was more flexible in this area. My questions:
1) if I want to store cart items/details in an array and session variable do I need to use only js (and can not switch back and forth from vbscript and js)
2) if I have an array 6x12 and want to delete all the items associated with say arrayItem[1, 0...12] what is the proper coding to delete...is it splice?
3) any good articles about js, arrays, and multidimensional arrays for a beginner?
Closing all windows should end the session but on the reopening cookie page I find the session cookie is still alive.
If I alert(document.cookie) I get viewStatus = 1
If I rename the cookie to say "vStatus" and close the window when I reopen it and alert(document.cookie) I get
viewstatus=1 vStatus=1
any ideas?
This only happens in IE ( as always)
PS
I just did a little experiment, I closed all windows, created a new file with just
<script> alert(document.cookie) </script>
in it then opened the file and still got
viewstatus=1 vStatus=1
I know I did not have this problem before because I have a session cookie example on my site and that does not work now so is it something new that is wrong with IE.