I'm using the ckeditor 3.4 as text editor for my website, and want to validate the data at client side first, before submitting the data to server.
I can get the data of editor by using this code:
var editorData = CKEDITOR.instances.editor1.getData();
but having trouble to validate data. The problem is:
- The data should be invalid i...
I have an existing class I need to convert so I can append functions like my_class.prototype.my_funcs.afucntion = function(){ alert(private_var);} after the main object definition. What's the best/easiest method for converting an existing class to use this method? Currently I have a JavaScript object constructed like this:
var my_class ...
Hi,
Ultimately my application is pattern matching based on a text selection within a web browser, generating regEx code so that a portion of a page can be revisited and read anagrammatically.
I'm currently pulling a portion of the text by walking up the dom and then returning innerHtml.
The issue that I have is the text value of the i...
This is a situation I've run into several times, not sure what the best approach is.
Let's say I have some kind of dynamic content that users can add to via Ajax. For example, take Stack Overflow's comments - people can add comments directly on to the page using Ajax.
The question is, how do I implement the addition itself of the new c...
Trying to pass a form value into a global var to be use in two functions but get this error document.PostReply is undefined or the javascript just crashes because getReplyId is undefined within the functions. No matter what I have tried I get one or the other errors
Can anyone see why the form value "ReplyID" is not being passed into th...
Okay I have a simple Javascript problem, and I hope some of you are eager to help me. I realize it's not very difficult but I've been working whole day and just can't get my head around it.
Here it goes: I have a sentence in a Textfield form and I need to reprint the content of a sentence but WITHOUT spaces.
For example: "My name is Sl...
Possible Duplicate:
javascript test for existence of nested object key
Consider this:
typeof(object.prop1.prop2) == "undefined"
where
object.prop1 is undefined
This will output a javascript error, how to handle this situation beautifully?
ie: no multiple if
...
I'm trying to understand the following code block and am a bit stumped.. specifically I'm confused as to what the YAHOO.example.XHR_JSON = part is about. It looks like we're creating an anonymous method that creates a named anonymous method?
YAHOO.util.Event.addListener(window, "load", function() {
YAHOO.example.XHR_JSON = function...
Hello StackOverflow,
I have a GeoExt map panel with a zoom control. I'd really like to disable some of the nodes in a tree panel when the layers on my map are "out of range" aka their setVisibility is set to false. I have my zoomend event working and I also have a checkchange event working, but the checkchange event gets evaluated mor...
How do I call a given function every X seconds ? In this case i made a function that scrolls some images . I want the image to change based on a given interval of time ex every 5 seconds but i really have no idea :/ some suggestions and good practice for this ? Thank you.
...
Okay, I have this textfield form that contains some text.
What I need to do is to count number of characters of that particular string and print it into another textfield form, basically like this:
function numberOfCharacters() {
var number = document.forms[0].textfield1.length;
document.forms[0].textfield2.value = number;
}
...
What is the best way to randomize part of the array in Javascript
For example, if I have 100 items in the array, what is the fast and efficient way of randomizing set of every 10 times. Items between 0 and 9 is randomize within data items[0] to items[9]. Items between 10 to 19 are randomize within data items[10] to items[19] and so on.....
I'm using Adobe Dreamweaver CS5 to revamp a site.
I am using Dreamweaver's built-in Spry Collapsible Panel widget to shorten the length of a bio page by having additional paragraphs about board members extend out when 'more' is clicked, and close when it is clicked again.
Here's the resulting html when you insert an instance of a Colla...
I'm guessing afterInsertRow is the method to use, and I've already got extra data for each row (read/unread), with the key "readStatus".
What I do no want is to be transversing the DOM after grid has completed to add a css class to row based on some cell value.
Any suggestions?
Add-on:
If this is the cell data:
{"cell":["blah blah b...
Clarification
This is part of a script that checks if a user has changed and values in a form. If the user attempts to leave the page after changing a value they get alerted via onbeforeunload and are presented with the option to either leave the page or stay.
The tricky part is determining the changed state of a (multiple) select list...
Hi,
I am using a datalist inside which I have defined an itemtemplate. I am using asp:LinkButton inside this itemtemplate. I have used an OnClick="methodname" in this linkbutton tag. I have the corresponding mehtodname defined in my code behind, However I keep getting a Java runtime error when the page loads up and when I click on any ...
I want to display a text box on my webpage which has a Date input mask. For example:
When the user visits the page; the text box should be prefilled with dd/mm/yyyy in light grey color. He should overwrite the same using some valid date like 20/12/1990.
How to accomplish this task (JQuery, JavaScript)? Any inputs would be helpful!!
...
Is it 100% impossible to get the browser URL from the iframe html of an iframe that is loaded onto a separate domain? I tried javascript and it did not work. What language could I do this in? Thanks!
UPDATE
Thanks for the help! PHP does work.
<?php
if(isset($_SERVER['HTTP_REFERER']))
{
echo $_SERVER['HTTP_REFERER'];
}?>
...
I have a classifieds website, and when posting a new ad, users may chose to upload pictures.
Currently, the form on the page submits to itself whenever a file is chosen, and then PHP uploads the actual file, which is then lastly displayed to the user.
I use javascript to set some hidden-inputs on the page, and then submit the form to i...
I have two images yes and no, which change color when clicked, they get highlighted. When clicked on yes_unselect, it needs to change to yes_select and change the id of no to no_unselect. I am facing two problems.
1. When once clicked the yes_unselect is changing to yes_select but clicking on that again is not changing back to yes_unsele...