Jump to content

Search the Community

Showing results for tags 'functions'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 17 results

  1. Please i dont know why the my little code do not run the header function - header('Location: http://www.example.com/'); Please i need ans. thanks <?php session_start(); //start the session for the page include("db.php"); //include database file //Check if page was entered by a submit button $user_name=$_POST['user_name']; //Get username !!FROM FORM!! $password=($_POST['password']); //Get name !!FROMFORM!! if (!empty($user_nam
  2. Hello, this is my first post on the forums after learning HTML and JavaScript for the past 2 weeks. I have a suggestion to make for the JavaScript Functions tutorial, specifically learning how to call a function. The tutorial is very good overall and I am enjoying learning about HTML & JavaScript. As this is my first exposure to coding, my suggestion may be out of place or unusual that I did not know this particular information. However, the JavaScript tutorial never to my knowledge taught me how to call a function the way Exercise 1 at the bottom of the Function tutorial (https://www.w3sc
  3. Hi, I've made an html page that invokes a function automatically ( using the parentheses b/4 & after ) to make a table from an XML file. It worked great with a little help from you guys. I then made another one to read a different XML file and that worked great. I want to put both tables on the same page so I made a couple of 'divs' and positioned each in a column formation. That part seems to work well, but I am calling the 2 functions to make the tables consecutively and it doesn't work as I wanted. When I open this file in a browser, as it is here, I get only the second table in
  4. Hi there, I've recently started to try and learn JavaScript on my own in my spare time, as it's an area of work I'd like to get into (not exactly loving my current occupation). I'm trying to learn it from a book I got and finding it very difficult! Much harder than html and css (which I've been learning for a few months as well). I'm trying to answer this question below with a 'for loop' (which is partially running), but I'm really lost as to how to answer it using a function?? Could anyone give me some advice, as it's really doing my head in! It'd be greatly appreciated indeed.... Question:
  5. Hello all, I am coming to learn PHP with a C/C++ background and noticed something which I think is incorrect: $myfile = fopen(); retuens a handle to the file. In the explanation for fread() however it is used and the explanation is that it is the name of the file as the 1st argument. This in my opinion is an incorrect explanation, it is actually the HANDLE. The majority of the PHP syntax however is mostly clear to me. Thanks to those who put the effort, to help us new comers... Cheers Alex
  6. I Have Just Read About The performance.now() Standard,But I Felt Uncomfortable About It. Is There Any Other Way To Solve This?.
  7. I have a function that calls another function inside a "for" loop. The second function uses setInterval() to display and update a countdown clock on the web page. The user sets the time on the countdown clock in minutes, and also sets the number of times the loop will operate (how many countdown clocks). I want the code in the first function to wait until the clock reaches zero before continuing. function firstFunction(){ for(I=1; I<count; I++){ some code... secondFunction(); more code... } My one idea was to create a global variable/flag with a "while" loop with
  8. Please forgive me, I'm new at this and old, so the going is slow. 1. If you place multiple functions in .js file, can a functions overwrite or negate other functions? If so, is there special designation that need to be placed in .js file. I'm having trouble with functions not working on the webpage like buttons not working correctly after adding a another function. (I'm not on a live webpage - just learning) 2. Are js files exclusively for functions? Can other things be placed in a .js file besides code that start with function because I've tried other things like example below and co
  9. I have an application that needs about a dozen separate unrelated and independent javascript functions to run as designed. At present, they are all in a single header (about 17,700 lines of code). All of them, except one, have less than 100 lines of code. The one exception has over 16,000 lines of code. Is there any limit to the number of javascript functions that can appear in a header? Is there a limit to the function size? Do they have to be placed in any specific order? If yes, I'm assuming that I will have to carve them out into separate included js files. If this is the case, the
  10. Hello. I have a problem that's making me feel like an idiot. I have this function. The exact code is maybe not that important because, if I copy/paste the exact code into the program, it is working (but still appending it just in case). However, when I put it in front of the program, I get "TypeError: rad is not a function". There are other functions so I tried putting him in the same SCRIPT tags, tried to separate them, neither is working. <script>function rad(x,y){ var temp=0; if ((y==0) || ((Math.abs(x)/(Math.abs(y)+0.01))>=2)) temp=Math.abs(x); else temp=Math.abs
  11. I'm designing a feature-rich website with object-oriented PHP and I have a performance question. My background is in C, C++ and C# (.NET) programming. Now all those are compiled whereas PHP is interpreted. The following require_once statements are at the top of each page: <?phprequire_once "_php/library/Session.php"; // Session class (session related functionality)require_once "_php/library/Databases.php"; // Databases class (database related functionality)require_once "_php/library/DatesTimes.php"; // DatesTimes class (date and time related functionality)require_once "_php/library/User.p
  12. hello w3s again... i have trouble again with a self project, and this time (like allways) i have no clue why it does this... 1. i have some files like so given in picture: ATTACHED now inside the bittorrent.php file, i have my whole site defined in functions like so: <?php/*=========================*/$mysql_host = "localhost";$mysql_user = "root";$mysql_pass = "daniel1";$mysql_db = "ss_2012";$db_details = mysql_connect($mysql_host, $mysql_user, $mysql_pass);mysql_select_db($mysql_db, $db_details)or die(mysql_error());/*=========================*/function stdhead($title = "",$css_file = "
  13. Hello W3S... what im trying to do here is to call a function that have some div's in it...and here is my code im using for this: <center><div id="content_body"><center><!--/**********************/--><div class="content_left"><?phpecho full_width_auto_begin_box("Latest News");include ("mods_content/index/news.php");echo full_width_auto_end_box();?></div><!--/**********************/--><div class="content_right"><?phpecho full_width_auto_begin_box("Stats");include ("mods_content/index/stats.php");echo full_width_auto_end_box();?></d
  14. EDIT: i found out myself... just look away from this topic ..
  15. Hi, I need external manual functions file, can i download it from Internet, if it's possible please guide me the site names. Thanks in advance.
  16. Okay, I understand what it does, but I'm having troubles understanding the process of the set/getCookie functions given as examples in the w3schools tutorial.I'm a jQuery junkie trying to ramp up to serious scripting (eventually with Ajax and PHP as its becoming apparent). While the school lessons have been invaluable I notice they don't always have a comprehensive list of objects, methods, or actions that can be done. For instance in the Cookie examples, how where does 'exdays' get defined, what do escape() and unescape() do, etc. I understand parts but others seem completely unexplained. Are
  17. I created a script on a php page. The script is activated when user clicks the submit button on a form. I want to write functions on the same php page. How do I do this? MyData.php<?function getData(){$fname = _POST['fname']; $lname = _POST['lname']; //statements that tells it to write the information to file} function showData(){$price = _POST['price']; $qty = _POST['qty']; $total = $price * $qty; echo $total;}?> MyOutputPage.php<html><head><title>Sample Page</title></head><body>//I want to call the showData() function on the MyData.php page.//How do
×
×
  • Create New...