I am trying to make a gui for clients to edit a php page that displays html and javascript.
I want the user to be able to move html elements around and even edit it like add effects like fade in and out etc.
Then after all the changes I want to overwrite the existing php file that does this for that user. how can you make such changes and then save it to a file?
It's an html / javascript editor but using a gui instead of allowing them to directly touch the code. It would be a security risk if I allow such a thing. So I need to program a interface that would make such changes and save them to file.
Like how can you delete and add new javascript code to the file?
I have a html cum javascript code.There is thumnail on the page .When somebody click the thumnail ,the full resolution of the same image would show and when click of full resolution the thumnail would show.It is going well with one thumanil of the page when there are 2 thumanil on the same page,clicking on first thumnail shows the full resolution of the same but the 2nd thumnail is also showing at the back of full resolution.It looks like full resolution image is transparent..
Here is the code ,you can try it by running at your own computer.
I paid for some to create a slideshow, and it works fine in the orginial html document but when i copy and paste the code into my html document the scroller to the left of the image stops moving up and downI put the working file at thisthe guy i paid to do work refuses to help even those i advertised the price in my ad and he wanted me to give to pay him more to tell which code to change
and in this code, it works, the call is made and text is added. in the other code I don't get a change at all. Not even in the database that add.php manipulates.
I am a novice, almost to an intermediate-level JavaScript guy, so much of this is new to me. I appreciate your patience reading this.
I have a routine that creates some HTML on the fly (updateFilters() function) and after the HTML is created, I attempt to access some fields (elements) on the form itself.
I works fine if I place an alert() statement after the HTML is created, but when I remove, the code errors out.
I have tried the setTimeout() statement, but I cannot grab the element --- undefined or null is returned. It seems that the form is the only element I can get a handle on --- everything else is undefined or null...
Here is the code:
function editQuery() { var f; var x; var myForm = document.forms[0]; // Get the row filters that were used in the last query.. for (f = 1; f < 16; f++) { var filter = eval("myForm.FilterList_" + f); if (filter.selectedIndex > 0) { var methodElement = element("FilterMethod_" + f); var methodIndex = methodElement.selectedIndex; var savedFilterMethodValue = methodElement.options[methodIndex].text; var choicesElement = element("FilterChoices_" + f); var choicesIndex = choicesElement.selectedIndex; if (isNaN(choicesIndex)) { var savedFitlerValues = choicesElement.value; } else { var savedFitlerValues = choicesElement.options[choicesIndex].text; } updateFilters(filter); // update the filters // take the saved methods and values and then update the selections // Alert here makes the code work.. // alert("Try this"); // Wait for HTML.. setTimeout("completeEdit()", 1000); function completeEdit() { // Since the object was updated, get the object again.. var methodElement = element("FilterMethod_" + f); for (x = 0; x < methodElement.options.length; x++) { if (methodElement.options[x].text == savedFilterMethodValue) { methodElement.options[x].selected = true; break; } else { methodElement.options[x].selected = false; } } // Since the object was updated, get the object again.. var choicesElement = element("FilterChoices_" + f); for (x = 0; x < choicesElement.options.length; x++) { if (choicesElement.options[x].text == savedFitlerValues) { choicesElement.options[x].selected = true; break; } else { choicesElement.options[x].selected = false; } } // Only display next row if f = 2.. // If only one row was used, no reason display the next row.. if (f == 2) { displayNextFilter(f - 1); // display it } } clearTimeout(timeOut); } } }
Do I have to pass the object (the form, the elements) to the completeEdit() function in the setTimeout() statement?
This works fine when I place this code under the html in the main source, but if I try to add this Jquery code to an external js sheet it doesnt seem to work?
Currently my js sheet is called in the header, when I move this link to the footer of my page the code works again, so Im guessing this has something to do with where the jquery code is placed in relation to the code Im trying to hide?
How I can keep my js in the header but still make the content disappear on click?
I am VERY NEW to javascript programming as I am to web development. I am pretty decent with VB.Net though. My question is, what are the different ways to call a JavaScript Function either from within XHTML Markup code or from a VB.Net Code-Behind file?
After realizing that htc files only work with Internet Explorer, I have needed to have JavaScript code to suit the two lots of css code below. Please help, I need the code pretty urgently. The code must work with most versions of browsers.
I hope whether such a script exists for what am wanting to do. From time to time, I need to send password information or login details and password information to some users. At the moment, am doing it via email with a subject named FYI and the body of the email basically just contain the login and the password or in some case, just the password. What am wanting to know is whether I can put these information into a HTML file which contains an obfuscated Javascript with a button that a user will click that will prompt for his login information and then will display the password. In its simplest form, I guess I am looking for a Javascript that will obfuscate a HTML file that contains the password. I found some website that offers such service as obfuscating a HTML file but am hoping it can be done via a Javascript so it is at least "portable" and I do not have to be online.
how I can get this lookup to work..:?I'm using a app that uploads an image and returns a hex code in a 3x3 grid. (See here: http://jrm.cc/color-palette-generator) I want to take this one stage further and have a code that will then take the Hex code and look up a field in an sql database containing hex codes. Then convert the hex code into an image containing the selected colour. For example;
User uploads image of the sky
App returns hex codes of sky
App then needs to look in a field database of images on server and finds image/s with similar hex value
App then returns images in replace of the hex code (i.e blue water, swimming pool, blue coloured hat etc etc)
I've a problem: I need to retrieve (in javascript) the soure HTML code from a url without loading the page then put the HTML source code in a string variable to manipulate it. From this variable I need to get all the links to perform some operations.
I found the following code on a web site. It creates a small frame inside a web page. The code is too advanced for me to understand. It does the job for me. What I would like to do is insert a small table in the frame. I don't know at what point and how to add the HTML code. I would also like to add a link to a CSS file.
function move_box(an, box) { var cleft = 0; var ctop = 0; var obj = an;
I 'd like to know if there is any way to load a file with javascript and print its contents to my page. More specifically I have a file named page1.html which contains a javascript. I want to make this script load the file, named page2.html and print its contents somewhere in my first page. Is this possible and how?
I'm a neophyte to Javascript, but I need it to dynamically add lines to a form. I was able to cobble together this inelegant looking code below. It adds the row when called, but there are more attributes needed for this to be correct for the application. 1) need to center the input in the TD 2)the input tags need type, size, maxsize, and value attributes added I have not been able to figure out the correct way to do this.
Also, is there a way for the value attribute to work with a PHP echo, or is there a Javascript method to display associative array values?
[Code]...
BTW is there an good online tutorial and/or reference for javascript or book(s) that you could recommend?
While saving the html code, I accidentally saved my code as encrypted code.I don't remember what did I do.More importantly, Now I dont' now decrypt it.
I want to make HTML appear as text to maybe write some snippets on a site. I know that there is a way to make < and > by using < and > but I would like something that were a bit easier to remember and quicker like maybe using jQuery to take the content from a snippet and turn it into regular text.