Jump to content

ronvanb

New Members
  • Posts

    9
  • Joined

  • Last visited

About ronvanb

  • Birthday 10/03/1978

Contact Methods

  • Website URL
    http://www.ronvanb.nl

Profile Information

  • Gender
    Male
  • Location
    Katwijk aan Zee

ronvanb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the awnser Anti-Moronic. This means my html stays the same.
  2. It's hard for me to say what is going on. after var width=0; On a new line paste in this one: alert("see if jQuery works"); Save it and upload to your server. Try the code. If you get an alert. It means jQuery works. If you don't get an alert. It means there is something wrong with the path to jquery.js or screenWidth.js. If the .js flies are in a seperate folder. You have to change the path in your html/php page. Something like: src="myJsFolder/jquery.js". I don't know because i can't see the the structure of the folders on your server. Can you post the css of the #main_div. I have not used css at all on the main_div. With jQuery it is possible ( not a productive solution ) to write all your css in javascript. If you get the the alert you can delete the alert("see if jQuery works"); I have tested it on an 800/600 resolution. It gets a width of 798px. Changed my resolution to 1280/1024 and it gets a width of 100% I used a background-color to test it.
  3. I have tried. But if i don't use a lybrary. I get a security risk warning in IE. Maybe i am doing something wrong I know we need to learn the basics. But with a library like jQuery or yui from YAHOO you can reduce your code and it is more crossBrowser compatible. Here is a link to jQuery. http://jquery.com/ If you click on download jQuery. You can copy/paste the code in a new file.js. For example. You can name it jquery.js It is only one script. So it is not hard to do. Just upload jquery.js and your new screenWidth.js script to your server In the head of your php/html script: <script language="javascript" src="jquery.js" type="text/javascript"></script> <script language="javascript" src="screenWidth.js" type="text/javascript"></script> The script i already posted works for me. I wish there where just one standard for javascript. Succes. If you have any questions? No problem.
  4. I'm gonna look for a solution without a library. Just a moment. When it is finished you can do this. Just open a new document. Think of a name for the script and give it the extension .js You can cut and paste the code in the js file. In the head of your html or php page. You can say: <script language="javascript" src="nameOfFile.js" type="text/javascript"></script> Upload the file to your server and test it. If you get errors. Firefox is a great browser to find the errors. The code you showed us. Is it complete? Because the function exit() is a php function. It will not work between javascript tags. In the css use /* comment */ instead of // comment. I think these are php comments and not css. Just a moment.
  5. I will try to help. If you like javascript librarys like jQuery. This would be a solution. I have tested it in IE and firefox. I dont know how it performs in other browsers. If you don't want to work with librarys because they take up space. Just let me or us know. I hope this is a solution. function screenWidth(){ var height=0; var width=0; if (self.screen) { // for NN4 and IE4 width = screen.width; height = screen.height } if(width < 801 && width > 783){ // I took the scrollbar in consideration $('#main_div').css("width", "798px"); // If you have a scrollbar on the right. You have to adjust the main_div width } if(width > 1024){ $('#main_div').css("width", "100%"); } } $(window).load(function(){ screenWidth(); }); You can keep adding screen resolutions in the code.
  6. The code can't find the function display_errors(). Maybe you forgot to include the function in info.php Or made a type mistake in the function name. It just cant find the function. If you call a function name that does not exist. You will get this error. I think that is the solution. Hope you will get it to work
  7. I'f you like php. There are lots of ways to minimize your css. Build one header and one footer. Fore example you can use a switch statment to get the content of your page. You can break up the css in multiple css files for the content. Your code looks better and is more practical. Hope it helps.
  8. Thanks for the great awnser mr thehippy. Just 1 question i can think of after reading this one. Javascript and ajax are two favorites of mine. Is it simple to keep combining them with my PHP if i start using a framework? I'm new to frameworks. And wondering if its the right direction to go for me. thanks again.
  9. Hello all. Sorry for my bad english. My Name is Ron and i'm from Holland. I like to program for the web. PHP, javascript, css and ajax are my favorites to work with. My favorite browser is firefox. And favorite editor is EmEditor. I hope to learn and help out here. See you on the forum. gr.ronvanb
  10. Hi _tina_ I am new at this forum. Please correct me if i am doing something wrong. Sorry for my english. :-\ On the slider page in the examples. View the source of the page. At the top there are some javascripts you have to include in your document. Just download the yahoo yui library (2006). You can find these scripts in the library build files. Always put yahoo.js before all other javascripts. I think that the slider uses pixels to count. So that would be a problem. I think you have to use whole numbers. Correct me if i am wrong. You can change the range and tickSize in the javascript. Just change these values to what you like. Dont forget to fit the css to your needs. #demo_bg has a width of 310px. Just set the right width to what you need. You can create your own images or copy them from the yui library.
×
×
  • 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.