![]() ![]() Below is a small script example that changes the link upon click on the logo of your site to redirect to the Google site instead of going to your home page: if your JavaScript requires to be called only when the page is fully loaded (eg for JQuery functions if you use this library) then you need to declare a function named onTOWebPageLoaded in which you will copy / paste your code (the name of this function is case sensitive).if your script (PHP and/or JavaScript) has to be added inside the page content and before the tag then just add your TOWeb script field inside the last paragraph of your topic (or inside the page footer if you want your script to be applied to all pages of your site).) has to be placed into the section of your page, you can do that from the "head" button located in the SEO properties of your topic (or from TOWeb step "Options > Security & HTML > HEAD" if you want that your script to be applied to all pages of your site) If you need to use additional files in the topic for your script (like for instance images, videos or applets) you can add them to the list of additional files. You may create or copy/paste more complex scripts containing HTML, JavaScript, PHP, applets, etc. This simple script is just a small example of a JavaScript code displaying the current date. Rename it to DATEĤ) In the Script Field Content replace the default script with a copy/paste of the following lines of JavaScript source code :ĥ) Inside one of your topic add the following text :Ħ) Generate and you should see, instead of %DATE% the current date displayed on your web page. ![]() The example of %DATE% for the current date in JavaScript.ġ) From the Fields' Editor create a new field by clicking on the Add the new fieldĢ) Its default name is NEW_FIELD.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |