RichardRotterdam
Members-
Posts
1,509 -
Joined
-
Last visited
Everything posted by RichardRotterdam
-
How can I allow users to upload videos to my website?
RichardRotterdam replied to mesh2005's topic in HTML Help
one thing is for sure you can't upload video's with html you need some serverside programming like PHP -
You probably shouldn't use spaces in urls unless its a variable your sending with the url
-
Well this is the javascript section your not supose to ask php stuff here. And I see a couple of javascript effect. One button effect that changes the button on a hover and one that displays text when i hover over something. I think you ment the hover that displays text in a box. Thats called a tooltip. Google up "javascript tooltip" and you will find plenty of usuable scripts
-
Do note that the value's in the textfields will be lost when you add a new textfield. This you can solve with a for loop checking every value before adding a new textfield
-
Is it just one html file or do you mean you want to read the files in a folder in both ways i think you should use ajax
-
wouldn't it be better to do this serverside instead of clientside? javascript can always be disabled. with php you can easily get the day name out of the the date with the function date()
-
Hi this might help you the main page <script type="text/javascript"> //funtion that sets the value in the showString Div function showString(iframeVar){ document.getElementById('showString').innerHTML=iframeVar; } </script> <div id="showString"></div> <iframe src="iframe.html"></iframe> iframe page function transferString(){ var myIframeVar="this was send from the Iframe" window.parent.showString(myIframeVar); } <button onclick="transferString()"> transfer string <button>
-
Wouldn't call IE a bad browser though, less secure and worse with css at times. Also IE needs a plug in to view svg files and I think <canvas></canvas> doesn't work in IE but I'm am not sure
-
Hmm no mentioned Ajax yet Ajax is able to call a php function on an external php file from your *html file
-
Sliding, Conveyor Belt Image Gallery. Maybe a job $$
RichardRotterdam replied to jwwceo's topic in Javascript Help
@emehrkay thanks for the headup gonna check that mootools thing out I am just checking out these javascript framework things and looking for one that suits me the most @jwwceo how much are we talking about don't think it is that hard to fix really -
Sliding, Conveyor Belt Image Gallery. Maybe a job $$
RichardRotterdam replied to jwwceo's topic in Javascript Help
I like that one looks cool. I checked your source code and saw that you use the $() function as in dojo framework only that your source has mootools.js is that a different javascript framework? -
Pixel Tracking issues with Internet Explorer
RichardRotterdam replied to Richzilla's topic in Javascript Help
This is basicly what your ajax script would look like this will work both in Firefox and IE read the comments i have made you will need to adjust the function sendRequest() to your needs function createRequestObject() { var req; if(window.XMLHttpRequest){ // Firefox, Safari, Opera... req = new XMLHttpRequest(); } else if(window.ActiveXObject) { // Internet Explorer 5+ req = new ActiveXObject("Microsoft.XMLHTTP"); } else { // There is an error creating the object, // just as an old browser is being used. alert('Problem creating the XMLHttpRequest object'); } return req; } // Make the XMLHttpRequest object var http = createRequestObject(); //calls the script on server function sendRequest() { //user data adjust these to your needs var mId ="merchant number"; var cs = "basket value"; var it = "items ordered"; var oi = "purchase number"; var ticks = new Date().getTime(); //the url that is called externaly var urlStr = "http://mysite/ProcessProductCheckout.ashx?mId=" + mId + "&it=" + it + "&oi=" + oi + "&cs=" + cs + "&tm=" + ticks; //the call is being made here http.open('get', urlStr); //uncomment the next line if you want to return a value on your page //http.onreadystatechange = handleResponse; http.send(null); } /*this function you wont need but you can use it for testing purposes create a tag in your body html with result as id for this to work example <div id="result"></div>*/ function handleResponse() { if(http.readyState == 4 && http.status == 200){ // Text returned FROM the server script var response = http.responseText; if(response) { // UPDATE ajaxTest content document.getElementById("result").innerHTML = response; } } } -
Sliding, Conveyor Belt Image Gallery. Maybe a job $$
RichardRotterdam replied to jwwceo's topic in Javascript Help
Hi check out these links. Not exactly what you are talking about but you can always modify I think the first example uses dojo framework since it doens't use getElementById() but uses $() instead http://zend.lojcomm.com.br/icarousel/example6.asp http://www.donkeymagic.co.uk/ajaxgallery/index.php?&picture=128 -
Piece of cake try this <script> function addField(){ var textfield='<input type="text" />'; document.getElementById('dynamic_fields').innerHTML+=textfield; } </script> <div id="dynamic_fields"></div><a href="javascript:addField()">add field</a>
-
Javascript split maybe if the input value is a string that is function divide_string() { var dateInString="12-01-2001"; var date_array=dateInString.split("-"); alert("day="+date_array[0]+" month="+date_array[1]+" year="+date_array[2]); }
-
[SOLVED] how do i set php session from javascript?
RichardRotterdam replied to sayedsohail's topic in Javascript Help
this topic is marked as solved? is it done like that? I can't see what this has to do with javascript communicating with php -
Pixel Tracking issues with Internet Explorer
RichardRotterdam replied to Richzilla's topic in Javascript Help
Something different came into mind maybe IE has problems with the image tag since the src is not a jpg or gif or whatever. maybe you should try to use an invisible iframe instead of image tag and don't use javascript at all <?php echo('<iframe width="0" height="0" src="http://mysite/ProcessProductCheckout.ashx?mId=77&cs='.$prodprice.'&it=1&oi='.$ordID.'×tamp='.$ts.'" ></iframe>'); ?> -
Pixel Tracking issues with Internet Explorer
RichardRotterdam replied to Richzilla's topic in Javascript Help
I took a better look at your script. If I am correct the script in the head section only works in IE since Firefox doesn't have ActiveXObject. have you tried to put that url in your IE browser manually? Something I also try is alerting the url in the script to check if there are no empty variables. -
The thought that a lot of people have all ready created a function to do just that came to my mind and yup that function can be found with google. http://www.javascriptkit.com/script/script2/calculateage.shtml just a matter of linking the functions togehter and your done
-
You don't really need to modify a javascript to understand that you just need a basic understanding of javascript DOM here is an example //function that changes the value in <span id="myspan"></span> function changeSpan(newValue) { document.getElementById('mySpan').innerHTML=newValue; } </script> </head> <body> <!--when you click on a link the value is passed to the javascript function "change span"--> <a href="javascript:changeSpan('first action')">1</a> <a href="javascript:changeSpan('second action')">2</a> <a href="javascript:changeSpan('third action')">3</a> <br /> <span id="mySpan"></span>
-
Javascript form field with same name for PHP
RichardRotterdam replied to jamina1's topic in Javascript Help
You can get inputfield values with javascript yes but is this really what you want? anyway here is how to get the values of your input boxes with javascript var startdate1=getElementById('startdate1').value; -
Pixel Tracking issues with Internet Explorer
RichardRotterdam replied to Richzilla's topic in Javascript Help
Being lazy as I am I only paid notice to your last comment that the image is being cached by IE. Here is a trick you can apply. instead of reading the image url why not add a little random variable behind your image here is an example imgUrl="pixel.jpg?rand="+Math.random() and that solves the image being cached in IE -
getElementById not working? please urgent help required.
RichardRotterdam replied to sayedsohail's topic in Javascript Help
I think I see the problem check the following line MyAjaxRequest("displaymodels","requestmodel.php?amake=$check_value1&amodel=$check_value2"); if I am right $check_value1 $check_value2 are your php variables but your passing it as if they are javascript variables you need to convert this variable to javascript variable first try this: //pass php values to javascript var checkValue1="<?php echo($check_value1);?>"; var checkValue2="<?php echo($check_value2);?>"; //ajax request correction MyAjaxRequest("displaymodels","requestmodel.php?amake="+checkValue1+"&amodel="+checkValue1); oh one thing else i see you have both $check_value1 and check_value1 looks a bit confusing and in the following line var check_value1 = document.getElementById(check_div1).value; are you trying to get a value out of a div tag? Don't think div tags are suppose to have the "value" attribute they do have innerHTML so that would look like var check_value1 = document.getElementById(check_div1).innerHTML; -
[SOLVED] how do i set php session from javascript?
RichardRotterdam replied to sayedsohail's topic in Javascript Help
Lets see your problem here correct me if I am wrong. You have a javascript variable that you wish to use as a php variable is this right? Maybe you can give me more detail concerning your problem and what it is that you are trying to accomplish because it seems you have a interesting problem one of my favs probably. If a process needs to be done over more then one page then I would use cookies (a shopping cart for example). But if all your actions need to be done(or it would be nice to handle within one page) then I would avoid cookies and use ajax instead which improve user usability -
[SOLVED] how do i set php session from javascript?
RichardRotterdam replied to sayedsohail's topic in Javascript Help
Calling a php action from javascript hmmm sounds like ajax or do you want to redirect the page to a php page? which is even easier.