I want to be able to set 'thevariable' in the shtml page that calls that include and pass it to that string - I'm thinking that because I don't want to use php/asp that Javascript is the best way?
I'm trying to combine some javascript variables into a URL, so I can pass the screen resolution to PHP to determine how large a popup window should be.
What I want to end up with is something like: <a href="url.php?w=1024&h=768">Click me</a>
OK, I am looking for advice or tips and suggestions. I have overcome a lot of the obstructions I had to building the page design my customer was asking for. I am looking now at ways to deliver content dynamically within the wonderful framework I created. Whilest I look into the various methods of delivering content within a container of one form or another in the existing HTML, I am also exploring the possibility of using some form of 'wrapper' for existing flat pages sorta like how geocities does to user pages to add the yahoo pull-down div layers and such.
While doing some testing, I notice that if I just add a javascript tag in the beginning, I can't use the document.body.AppendChild option for the div layers unless I call the function that builds said layers from a <body onload="">. When I do it from the onload event, the existing HTML layers can effect the placement of the div layers even when I have the CSS position set to absolute.
Short of using some form of server side code to insert at least the DIV content in prior to dropping the file on the user's browsers, I was wondering if there were any other suggestions on how to do this with a minimal amount of coding in the HTML document itself. One of my hopes is to limit the 'modifications' to any standard HTML file to one or two lines so that anyone else developing pages can do so easily, and/or I can create reasonably foolproof server-side wrappers to call the javascript code to paste on the 'look-and-feel' elements on just about any web page.
I have a feeling I will probably go the server-side route anyway, but I was just curious what other suggestions there might be out there.
I have this javascript code in a php page. I need to access the value of '+thenumber+' into a variable that PHP would understand so that I can carry the "thenumber" value onto the next page and be a usable php value.
I have this problem in xsl wherein i want to access a variable in javascript and use it my xsl. How would i access or use a javscript variable in my xsl file?
I have two events in a form that I am passing. One is to a javascript function, the other is to the same .asp page only with another action to show different data.
Onchange is calls the function updateclasses, which in turn reloads another drop-down list. It also reloads the .asp page, which refreshes the data. My problem is that it refreshes the second drop-down briefly, until the page reloads, but then resets the form. How do i pass this data to the .asp?
I thought in the .asp, I could just do something simple like the following, but wasn't sure of the correct syntax. is there a better way?
view = request.querystring("view") if view = "" then view = "SciLink" else %> <script language="JavaScript"> updateclasses(form1, 0, Student) </script> <% end if
Not sure whether this should go in the JavaScript or VBScript/ASP section, but I'll try here anyway.
I have an ASP include file that contains both VBScript and JavaScript code. The VBScript processes some information and has an onChange event which calls a JavaScript function. Within this javascript function I want to access a recordset and retrieve a value using a variable from the javascript. Here's the code from the JavaScript section. Code:
<script type="text/javascript"> function HTMLEncode( text ) { text = text.replace(/&/g, "&") ; text = text.replace(/"/g, """) ; text = text.replace(/</g, "<") ; text = text.replace(/>/g, ">") ; text = text.replace(/'/g, "'") ; return text ; } </script>
Now i want to store the content of 'text' in a php string. Is that possible?
I'm creating a simple memory game in which the user has to make pairs from cards. I would like the user to see the variable "trys" (the score) update on the page dynamically (in a text box would be great). I can do this by showing a msgbox every time try increments but this is annoying to use. I have been trying for hours to get this to work, using innerhtml. Code:
I'm trying to use a remote file for the purpose of setting the value of a single variable. It contains a single line of code: var rev_date = "R10-03-07";
In the HTML, it is called like this: <script language="javascript" src="http://some.domain.com/revdate.js"></script>
There is a function in the head: function setRevdate() { document.getElementById("revdate").innerHTML = rev_date; }
In the Body: <body onload="setRevdate();">
Then where I want to place the text: <span id="revdate">--</span>
The problem is that the page loads and the onload event seems to happen before the rev_date string object is created and produces a "rev_date not defined" error. If I hit the browser refresh, however, everything works fine and the text is displayed between the span tags. It continues to work thereafter as long as the browser session is not destroyed.
How can I program this to force the browser to wait for the script to be read in and the variable initiated before calling the function?
For ease of future modifications on my page, I want to have a list of URLs stored in an Array, and I want to then use these URLs in an href tag. Something like this:
How is something like this possible, as well as being fairly crossplatform, and intuitive? I've changed the syntax, and tried various other things to no avail.
I just want to know how can i pass the return value of a javascript function to a xsl variable.
I have an xsl file and from that file i will call a javascript function then the result will be stored in to the <xsl:variable> how will i do that? Or is it really possible to do that or is there other way of doing it?
I have a form that posts data to a PHP mailer page I have created. When it goes to the PHP mailer page it reads some of the data and modifies the page accordingly using Javascript (hiding certain divs, etc...). My goal, is to take all this data after it has been processed by Javascript and send it through my PHP mailer as it is currently formatted.
If it helps any, the track I am on right now involves encapsulating the Javascript processed block in a div. I am then trying to take the ..innerHTML data from that div and store it in the PHP $message variable for my mailer. This won't work because PHP is server side. So, I moved on to generate some Javascript code (with PHP) that sends all that messy HTML data that its processed through a URL variable to then be read by PHP. This doesn't really accomplish what I want as it cuts off about a quarter of the way through my data......
Any ideas??
One thing I thought of but don't know how to do or whether it's even possible is using PHP to view the source of the current page and store that as the HTML to be e-mailed. Or, is it possible to do something similar to .innerHTML with PHP?
I am having problem to display variable that contains single quotes in its value(res= "msg='error'")value in javascript.I am geting only "msg= " in display.But if i open the jsp code there i got "msg='error' " Any one who know what is the problem please let me know.
I have the following code inside the <head> of my php file. What this code will do is change the style="display:none;" of a div element, depending on which option is selected within a combo box. Code:
I'm trying to build a PC building form using drop-down menus. I want to use the values of each option in the menu and add them together to get the total price, then display the total price somewhere on the page.
I'm still working on same task New problem: When I place text in a rectangle, then wish to overwrite it,(that is replace it with new test,) I cannot remove the earlier text. The new overlays the old, an unreadable mess.
Moreover, what I have achieved works only in Opera. FF tells me I have too much recursion (None that I'm aware of). I cannot get any feedback from IE.
I have a form that has two radio buttons. When the first one is clicked, I would like the page to refresh (keeping the form data in tact) and then displaying 2 new fields that need to be filled out. If the second button is clicked, I need the same thing to happen, only it will display two different fields needing to be filled out.
Does anyone have code that will do this? Or is this even possible with JavaScript?
I want to do this with a checkbox and am falling down on it... Code: var i=0, elem, qstr=''; while(elem=document.forms['form1']['quantity'+(++i)]){ qstr += (qstr.length ? '&' : '?') + 'quantity' + i + '=' + elem.options[elem.selectedIndex].value; }
Here is the checkbox Code: <input type="checkbox" name="approved[]" onclick="boxchk(this,6)" checked="checked" value="'".$j['id']."'"/>
I am very new to web development. I would like my website to have an application which allows a user to draw images which can be displayed on other users screens in real time.
An example of this is isketch.net Also on this site i would like users to be able to create accounts and join 'rooms' where they can communicate in real time (as opposed a forum message board). I am looking for something similar to isketch.net
Could somebody please tell me the type of development and programming needed. I have been quoted 1000 a month to build these capabilities but have no idea what is involved. (also may require facebook style real-time updating)
I am trying to build my first script. My problem, is I'm trying to build a multi hide/show script, displaying paragraphs of information. If I want multiple variables for the script do I have to use an array? and if so, how can I construct this array?
Here is my script as of now,
<!-- // this tells jquery to run the function below once the DOM is read $(document).ready(function() {
[code]....
Right now the script doesn't work with the bottom two variables profile_"ect."