Jump to content

linuxfreakphp

Members
  • Posts

    30
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

linuxfreakphp's Achievements

Member

Member (2/5)

0

Reputation

  1. the full code with explaining .josh: javascript code: function myajaxFunction(str, str2, number, number2) { try { var url = new String; var url = './../private/php/index.php?number='; var url2 = new String; var url2 = '&path='; var url3 = new String; var url3 = '&number2='; loadXMLDoc(url, url2, url3, str2, number, number2, function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200) { try { document.getElementById(str).innerHTML = xmlhttp.responseText; } catch(err) { error_function(err); } } }); } catch(err) { error_function(err); } } function trackv(str,number1,number2) {// number is number in the php page and number2 is number2 in the php page. try { var str2= new String; str2 = window.location.pathname; // getting the path to the php page with javasript myajaxFunction(str, str2, number1, number2); } catch(err) { error_function(err); } } html code: <!-- links to the same page but in a second language: --> <div id='c_language' class='languages' ></div> <!-- default language or chosen language by user, but this div is not doing nothing--> <div id='nc_language' class='languages' onclick='trackv("nc_language", "0","1");' ></div> <!-- my problem, sending a command to js that active the php page with ajax to switch the language, when "1" is number2 in the php and "0" is number --> <!-- links into another page in the same language: --> <div id='title_op1' class='title_op' onclick="trackv('title_op1','1','0');" >index</div> <div id='title_op2' class='title_op' onclick="trackv('title_op2','2','0');" >page2</div> <div id='title_op3' class='title_op' onclick="trackv('title_op3','3','0');" >page3</div> <div id='title_op4' class='title_op' onclick="trackv('title_op4','4','0');" >page4</div> the full php code: if($_REQUEST['number2']==1) // link to a second language to the same page. { $temp = strpos($_REQUEST['path'], 'enpath'); if($temp==true) { $path='hbpath'; } else { $path='enpath'; } echo '../' . $path . '/' . $path2; } else if($_REQUEST['number2']==0) // link another page but in the same language { $path = dirname($_REQUEST['path']); if($number == '1') { echo 'index.html'; } else if($number == '2') { echo 'page2.html'; } else if($number == '3') { echo 'page3.html'; } else { echo 'page4.html'; } } /* i have another case and that why i used "else if" and not just else when number2 is telling the php code where to go and what to do.*/ now you can see how this code is working and you can see all the code. explaining about the code and what his doing: this code allow the user to move between two languages to the same page in the other language and to another page in the same language. let say page3 to page4 in 'enpath' or move to page3 of 'hbpath'. -------------------------------------------------------------------------------------------------------- i found the problem. $temp = stripos($_REQUEST['path'], '/e/'); i told it to searched a special character as '/' in the command and it is not working. i searched in google and checked the if $temp is getting something and his not getting nothing on the site (cpanel), but when i change folder name e into 'enpath' and searched: $temp = stripos($_REQUEST['path'], 'enpath'); $temp do get value i need and the code is working cpanel real site and the localhost. how can i use special characters in text functions as i did in this case if i need to find this string or someting else with special characters??? '/e/' , '/h/' , '$?/la?/' this way failed on my server.
  2. for .josh hey i gave the php code but here is the folders and files map. site address folder: ->index.php (redirect into one of index file "h" or "e when the user enter the site using the user ip address country. this part is working only in the cpanel in real site because localhost have not country ip.) ->e (755) ->index.html ->page2.html ->page3.html ->page4.html ->h (755) ->index.html ->page2.html ->page3.html ->page4.html ->private (755) ->css (755) ->php (755) ->index.php (this is the code i have post in the message when the values are getting from index.js with ajax and i need help with him.) ->js (755) ->index.js ->img (755) now the code i post is switching languages by checking if the current page is found in "e" or "h" by checking the path of the page and redirect it into the same page but in the other language folder. $_REQUEST['path'] is sent from index.js with ajax and command: window.location.pathname (client side) to the php file (server side). on the local host the code is working great,but on the real site it is not working ok. $_REQUEST['number'] and $_REQUEST['number2'] send to index.php with $_REQUEST['path'] in the same function. for a sample let just say i'm in "nevermindthesitename/e/index.html" this code must redirect me into "sitename/h/index.html". sample with "h" if i'm located in "page2.html" inside "h" the code must redirect me into page2.html but in folder "e". for objnoob: the localhost run with apache and real site that run with apache and cpanel working with linux operating systems. for gristoi: tried what you have wrote, but it is not helping in this case.
  3. hey guys i have a problem with the next code. i wrote, but i have the same problem in this version as well. $path2 = basename($_REQUEST['path']); $number = $_REQUEST['number']; // case 1: if($_REQUEST['number2']==1) { $temp = stripos($_REQUEST['path'], '/e/'); if($temp==true) { $path='h'; } else { $path='e'; } echo '../' . $path . '/' . $path2; } now in the localhost-127.0.0.1 it is working great but in the cpanel the real site no why? php version may be? the code build to switching between languages interfaces and again it is working fine under localhost and the problem is only in the cpanel. i tried this one as well (those codes do the same thing) just to test it in the local host and the cpanel and the problem is repeating: $path2 = basename($_REQUEST['path']); $number = $_REQUEST['number']; // case 1: if($_REQUEST['number2']==1) { $temp = stripos($_REQUEST['path'], '/e/'); if($temp==true) { $path='h'; } else { $temp = stripos($_REQUEST['path'], '/h/'); if($temp==true) { $path='e'; } } echo '../' . $path . '/' . $path2; }
  4. Thanks kicken, your answer answered my question and after a addition search in Google i build what i wanted and test it on line in my site. in this site case ip tracking is better because many people in county use browsers that show "en" and not the first language of my country and that is why i chose the ip tracking and not $_SERVER['HTTP_ACCEPT_LANGUAGE'. my browser chrome gave: "en-US,en;q=0.8" my browser firefox gave: "en-US,en;q=0.5" my browser opera gave: "en-US,en;q=0.9"
  5. at this links i have a code that need to run a slider base JQuery. http://pastebin.com/CrhCDTzv i know that is not should be in the onload function, but i wanted to see the output. i also tied it as it working in the sample, but when the slider code Integrated with regular code it not working or giving an error: (included in link 1) now this is the sample that working: full code - http://pastebin.com/8SsgcqzS (no css only html and js) $(function() { $('#slides').slidesjs({ width: 1000, height: 480, start: 1, play: { active: true, // [boolean] Generate the play and stop buttons. // You cannot use your own buttons. Sorry. effect: "fade", // [string] Can be either "slide" or "fade". interval: 4000, // [number] Time spent on each slide in milliseconds. auto: true, // [boolean] Start playing the slideshow on load. swap: true, // [boolean] show/hide stop and play buttons pauseOnHover: true, // [boolean] pause a playing slideshow on hover restartDelay: 4000, // [number] restart delay on inactive slideshow } }); }); i tried to run also with $(function() { }); once html page and once in the js file (index.js once) or <script type="text/javascript"> $(document).ready(function(){ try { jquery1(); } catch (err) { error_function(err); } }); </script> in the html page the error is always showed in the chrome and the firefox can run it without any problem. i know i have missed something but i find what yet. what is the problem.
  6. meaning the data will be update when this every coin will get a new value down or up. i search in google and got only answers how to buy and sell coins, meaning trading coins all over the world only and not how to get the coins values. also how do i do that with php or js,jquery?
  7. i know i can just redirect it with jquery ,js - client side, or using php - server side, but what is the fastest way to do that when the page is loading? let say i have users from the us, uk, canada - English language, French, German, Chinese... now where is the best place to detect the ip of the country and then give the user the interface in his language? second question, if the user want to change the language with a language buttons like: English, French, German, Chinese... what is the fastest way to do that again without redirect the page to another page? client side, server side or both. i can track the ip, i can redirect the page in more than one way, but i'm looking for the fastest way and that why I'm asking this.
  8. i didn't said it work for me in firefox or chrome, but i said the opera different browser allow the code run and work and i asked why about the opera. because the opera accept it in four pc's when the firefox and the chrome didn't accept the code on this pc's. linux and windows the result was the same.
  9. sorry now i see where is my mistake now and i set it in my code, thanks jazzman1. now the firefox and chrome is working with that and also the opera, but i want to know please why did the opera worked and firefox and chrome not with my mistake? can you tell me why please? html code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="./style/style.css" /> <script src="./javascript/index.js"></script> <script src="./javascript/jquery-1.10.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ try { jquery1(); } catch (err) { error_function(err); } }); </script> </head> <body> <div id='all_divs'> <div id='master'> <div id='top'></div> <div id='title_top'> <div id='********'> <div id='***'>***</div> <div id='******'>******</div> </div> <div id='title_op' class='title_all'>Contect us</div> <div id='title_op' class='title_all'>Projects</div> <div id='title_op' class='title_all'>Info</div> <div id='title_op' class='title_all'>Home</div> </div> <div id='title_buttom'></div> <div id='slideshow'> </div> </div> </div> </body> </html> index.js try { function jquery1() { try { var color = $('#title_buttom').css('background-color'); $('.title_all').on('mouseover',function () { var styles = { backgroundColor: 'red' }; $('#title_buttom').css(styles); }); $('.title_all').on('mouseout',function () { $('#title_buttom').css('background-color', color); }); } catch(err) { error_function(err); } } function error_function(err) { txt="There was an error on this page.\n\n"; txt+="Error description: " + err.message + "\n\n"; txt+="Click OK to continue.\n\n"; alert(txt); } } catch(err) { error_function(err); }
  10. your code don't show what wrong with syntax. the chrome with your code is telling me the same thing Uncaught SyntaxError: Unexpected token ILLEGAL index.xhtml:116 but i have only 79 lines of codes only. the firefox with your code is telling me the same thing as before. [17:28:02.967] SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function @ http://127.0.0.1/bla/temp39/ver6/javascript/index.js:3 [17:28:03.252] SyntaxError: Using //@ to indicate source map URL pragmas is deprecated. Use //# instead @ http://code.jquery.com/jquery-1.9.1.min.js:1 [17:28:03.252] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.252] TypeError: function a does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.253] TypeError: function P does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.253] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.253] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.253] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.253] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.254] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.254] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.254] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.255] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.255] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.255] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.255] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.255] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.255] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.256] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:4 [17:28:03.257] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.257] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.258] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.258] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.258] TypeError: function In does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.258] TypeError: function zn does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.258] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.258] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.259] TypeError: anonymous function does not always return a value @ http://code.jquery.com/jquery-1.9.1.min.js:5 [17:28:03.265] ReferenceError: reference to undefined property d.attributes[c].expando @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.265] ReferenceError: reference to undefined property b.valHooks[this] @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.270] SyntaxError: illegal character @ http://127.0.0.1/*********/index.xhtml:55 [17:28:03.304] Unknown property 'box-sizing'. Declaration dropped. @ http://127.0.0.1/*********/index.xhtml [17:28:03.305] ReferenceError: reference to undefined property b.event.triggered @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:03.306] ReferenceError: reference to undefined property b.cache[e[b.expando]] @ http://code.jquery.com/jquery-1.9.1.min.js:3 [17:28:59.882] Ignoring get or set of property that has [LenientThis] because the "this" object is incorrect. @ chrome://firebug/content/chrome/reps.js:476 [17:29:41.917] The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page. and again the opera has no problem at all and the your code and my code are working on the opera great.
  11. here is the error log using firefox: [23:08:37.433] ------ http://127.0.0.1/***/********/****/index.xhtml [23:08:37.512] GET http://127.0.0.1/***/********/****/index.xhtml [HTTP/1.1 304 Not Modified 0ms] [23:08:37.653] GET http://127.0.0.1/***/********/****/style/style.css [HTTP/1.1 304 Not Modified 0ms] [23:08:37.654] GET http://127.0.0.1/***/********/****/javascript/index.js [HTTP/1.1 304 Not Modified 0ms] [23:08:37.572] SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function @ http://127.0.0.1/***/********/****/javascript/index.js:5 [23:08:37.655] GET http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js [HTTP/1.1 304 Not Modified 0ms] [23:08:37.593] SyntaxError: Using //@ to indicate source map URL pragmas is deprecated. Use //# instead @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:1 [23:08:37.593] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.594] TypeError: function o does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.594] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.594] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.594] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.595] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.595] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.595] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.595] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.595] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.595] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.595] TypeError: function R does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.596] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.596] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.596] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.596] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.596] TypeError: function at does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.596] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.597] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.597] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] TypeError: function In does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] TypeError: function zn does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] TypeError: function Zn does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.598] SyntaxError: test for equality (==) mistyped as assignment (=)? @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.599] TypeError: anonymous function does not always return a value @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:6 [23:08:37.606] ReferenceError: reference to undefined property d.attributes[c].expando @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.606] ReferenceError: reference to undefined property e.selector @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:4 [23:08:37.638] SyntaxError: illegal character @ http://127.0.0.1/***/********/****/index.xhtml:33 [23:08:37.719] Unknown property 'box-sizing'. Declaration dropped. @ http://127.0.0.1/***/********/****/index.xhtml [23:08:37.720] ReferenceError: reference to undefined property x.event.triggered @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 [23:08:37.720] ReferenceError: reference to undefined property x.cache[e[x.expando]] @ http://127.0.0.1/***/********/****/javascript/jquery-1.10.2.min.js:5 can anyone now help me find the problem? chrome log: Uncaught SyntaxError: Unexpected token ILLEGAL index.xhtml:71 but i have only 57 lines in my xhtml file. I'm adding the last version of the code i have. index.js: /* */ /* */ try { function jquery1() { var color = $('#title_buttom').css('background-color'); $('.title_all').on('mouseover',function () { var styles = { backgroundColor: 'red' }; $('#title_buttom').css(styles); }); $('.title_all').on('mouseout',function () { $('#title_buttom').css('background-color', color); }); } } catch(err) { txt="There was an error on this page.\n\n"; txt+="Error description: " + err.message + "\n\n"; txt+="Click OK to continue.\n\n"; alert(txt); } xhtml file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <link rel="stylesheet" href="./style/style.css" /> <script src="./javascript/index.js"></script> <script src="./javascript/jquery-1.10.2.min.js"></script> <!--<script src="./javascript/jquery.slides.min.js"></script>--> <!--<script src="./javascript/jquery.easing.1.2.js"></script>--> <!--<script type="text/javascript" src="./javascript/movingpicsandmovies.js"></script>--> <!--<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>--> <!--<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>--> <!--<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>--> <!--<script src="http://code.jquery.com/jquery-1.9.1.js"></script>--> <!--<script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script>--> <script type="text/javascript"> try { $(document).ready(function () { jquery1(); }); } catch(err) { txt="There was an error on this page.\n\n"; txt+="Error description: " + err.message + "\n\n"; txt+="Click OK to continue.\n\n"; alert(txt); }​ </script> </head> <body> <div id='all_divs'> <div id='master'> <div id='top'></div> <div id='title_top'> <div id='**********'> <div id='new'>***</div> <div id='models'>*********</div> </div> <div id='title_op' class='title_all'>Contect us</div> <div id='title_op' class='title_all'>Projects</div> <div id='title_op' class='title_all'>Info</div> <div id='title_op' class='title_all'>Home</div> </div> <div id='title_buttom'></div> <div id='slideshow'> </div> </div> </div> </body> </html> or just the xhtml with js in the same file: (still not working with firefox and chrome.) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Language" content="he" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <link rel="stylesheet" href="./style/style.css" /> <!--<script src="./javascript/index.js"></script>--> <script src="./javascript/jquery-1.10.2.min.js"></script> <!--<script src="./javascript/jquery.slides.min.js"></script>--> <!--<script src="./javascript/jquery.easing.1.2.js"></script>--> <!--<script type="text/javascript" src="./javascript/movingpicsandmovies.js"></script>--> <!--<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>--> <!--<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>--> <!--<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>--> <!--<script src="http://code.jquery.com/jquery-1.9.1.js"></script>--> <!--<script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script>--> <script type="text/javascript"> try { $(document).ready(function () { //jquery1(); var color = $('#title_buttom').css('background-color'); $('.title_all').on('mouseover',function () { var styles = { backgroundColor: 'red' }; $('#title_buttom').css(styles); }); $('.title_all').on('mouseout',function () { $('#title_buttom').css('background-color', color); }); }); } catch(err) { txt="There was an error on this page.\n\n"; txt+="Error description: " + err.message + "\n\n"; txt+="Click OK to continue.\n\n"; alert(txt); }​ </script> </head> <body> <div id='all_divs'> <div id='master'> <div id='top'></div> <div id='title_top'> <div id='***********'> <div id='new'>***</div> <div id='models'>***********</div> </div> <div id='title_op' class='title_all'>Contect us</div> <div id='title_op' class='title_all'>Projects</div> <div id='title_op' class='title_all'>Info</div> <div id='title_op' class='title_all'>Home</div> </div> <div id='title_buttom'></div> <div id='slideshow'> </div> </div> </div> </body> </html>
  12. i don't know what to say man because the link you post with my code, allow me to see the code active and it is working with the firefox and chrome, but on my server (real site with dns c-panel) and my local host 127.0.0.1 with the same chrome and firefox it is not working. i have other codes and samples that using js and i have no problem with those codes and the browsers: firefox and chrome do allow javascript to run. what else can i checked if i can see that your link with my code is woking fine in the firefox and chrome?
  13. here is my way with two div's in the same line: html sample code: ( as sub div's to 'sub' it's works as well. ) <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <link rel="stylesheet" href="index.css" /> </head> <body> <!--<div id='sub'>--> <div id='sub1'>1</div> <div id='sub2'>2</div> <!--</div>--> </body> </html> css sample code: /* background-color sub1 and sub2 */ #sub1 { background-color: #3856FF; } #sub2 { background-color: #1A44FF; } /* width + height + display (two div's in the same line) */ #sub1, #sub2 { display:inline-block; height:400px; width:400px; } notice: if you will change: display:inline-block; into this line: /*display:inline-block;*/ you will see what display do. here i got a sample with three div's in the same line: (html) <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <link rel="stylesheet" href="index3.css" /> </head> <body> <!--<div id='sub'>--> <div id='sub1'>1</div> <div id='sub2'>2</div> <div id='sub3'>3</div> <!--</div>--> </body> </html> (css) /* background-color sub1 and sub2 */ #sub1 { background-color: #3856FF; } #sub2 { background-color: #1A44FF; } #sub3 { background-color: #FFEB6C; } /* width + height + display (two div's in the same line) */ #sub1, #sub2, #sub3 { display:inline-block; height:400px; width:400px; } w3cschool - display hope that will help you.
  14. hey guys, i got a problem with Jquery. i have this code: $(document).ready(function () { var color = $('#title_buttom').css('background-color'); $('.title_all').on('mouseover',function () { var styles = { backgroundColor: '#FF0C55' }; $('#title_buttom').css(styles); }); $('.title_all').on('mouseout',function () { $('#title_buttom').css('background-color', color); }); }); explain what the code is doing: when the mouse is over class ".title_all" the id "#title_buttom" is exchange the exist background-color and when the mouse is mouseout the original color is exchange to the background-color of the id "#title_buttom" back. It is part of a new interface i'm building as some could guess. as you all see it is should work, but on my pc's linux operating systems suse and gentoo with the browsers firefox and chrome this code didn't working, but on the browser opera his working great. i ask some friends to run it and on their pc's linux and windows operating systems the firefox and chrome accept my code without any problem and it work's. what is the problem? i deleted all the history and close the and opened the browsers, but the code is still not working on my firefox and chrome. the code you see here on my server is more effective and advanced, but the problem stay the same as in this old version of my code you can see in this post. here is the html code, css code and the js code. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="./style/style.css" /> <script src="./javascript/jquery-1.10.2.min.js"></script> <script type="text/javascript"> $(document).ready(function () { var color = $('#title_buttom').css('background-color'); $('.title_all').on('mouseover',function () { var styles = { backgroundColor: '#FF0C55' }; $('#title_buttom').css(styles); }); $('.title_all').on('mouseout',function () { $('#title_buttom').css('background-color', color); }); }); </head> <body> <div id='all_div'> <div id='master'> <div id='title_top'> <div id='title_home' class='title_all'>Home</div> <div id='title_info' class='title_all'>Info</div> <div id='title_project' class='title_all'>Projects</div> <div id='title_contectus' class='title_all'>Contect us</div> </div> <div id='title_buttom'></div> </div> </div> </body> </html> css code: #all_div { width:1250px; height:800px; background-color:#0C39FF; } #master { top:5px; width:80%; position:relative; left:10%; } #title_home, #title_info, #title_project, #title_contectus, #title_buttom { background-color:#26FF1E; } #title_home,#title_info,#title_project,#title_contectus { border-top-left-radius: 15px; border-top-right-radius: 15px; display:inline-block; font-size:40px; text-align:center; } #title_home:hover, #title_info:hover, #title_project:hover ,#title_contectus:hover { background-color:#FF1145; } #title_home, #title_info, #title_project { width:235px; } #title_contectus { width:280px; } #title_buttom { height:20px; border-bottom-right-radius: 20px; border-bottom-left-radius: 20px; }
  15. hey, i found what was my problem in this model. the path i gave was from the javascript to the php, but the reference to the php need be to the html file and not to the js file. once i set the path in the external js file so the path will be from the html to the php and not the js file the problem solve.
×
×
  • 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.