Pardon me if I am not making any sense.What I want to know the
cordinates of selected text by user so that i can save/retrieve them
later.is It possible.I am lookig for both IE and Firefox solution.
I have multiple select boxes that have various options such as 'bangles', 'rings', 'earings' etc and I have a div that doesn't display until an option has been selected from one of the select boxes. If the option 'rings' is selected I don't want to display the div '#size'.
Jquery function:
The trouble I'm having is that I can't figure out how to use $(this) with option:selected. if I simply put the id of one of the select boxes then it works, but only for that one select box. I want it to be dynamic.
The first time you click a radio button in IE8, no value is returned at all (tested with document.write of the 'check' value), with an error "'null' is null or not an object". The second (and rest of the times) you click any of the checkboxes the wrong value is returned, it returns the value of the currently checked button (which we checked a moment ago) rather than the one we have checked the second time. Does Internet Explorer have issues with this onchange function method? Or is something wrong with my code?
like for example i have text areas named upload1 and upload2when I click or add input on upload1 a drop down list below upload2 will not change, but when I add input on upload2 the dropdown will select "parts"
How would I access the source of a webpage? I would like to get the source, then use a regexp to find text on a webpage. For example, retrieving a counter, or some other text that dynamically changes. I'm implementing this for firefox.
right now, i have a web page opening that contains that info, but i would rather have a pop up alert() that shows that info.
trying to read text from text child, basicaly seeking for equvivalent for this:
var groupArray = secondElement.getElementsByTagName("DIV"); // so looking for text nodes var groupArray = secondElement.getElementsByTagName("??????");
hmm tryed this, seems DOM doesn't see the text node that itself created
//2.TRANSFERING ALL CHILDS TO secondElement // case1 --> ONLY IMAGE APPEARS !!?? for (i = 0; i < firstElement.childNodes.length; i++) { secondElement.appendChild(firstElement.childNodes[i]); }
//case2 --> TEXT AND IMAGE APEARS secondElement.innerHTML = firstElement.innerHTML;
I have this page created, And in the page is a news header, In the header it says %ss%. Can someone help me create code, so that in the footer of the page javascript finds this %ss% and replaces it with text from a webpage?Code:What the web page that needs inserting does:I have this game and it uses php fsockopen to determine if a port is open. If the port is in use the page displaysThe server is <font color="#0066FF"><b>Online!</b></font>Otherwise it's:The server is <font color="#FF0000"><b>Offline!</b></font>
I am hoping you can help me. I am finding this problem rather complex to solve. I need to be able to find the surrounding text at the mouse position. For example, if a user clicks on a word in a paragraph, I need to programmatically know what the text is surrounding the click point. The text in question is not just content text, but DOM elements read in as text rather than the DOM element itself. For example, if a user clicks at the word "This" in the following:
<table><tr><td>This is good</td></tr> then I would like to know how to get the text "<td>" just before the "This" as text, not as a DOM element. Furthermore, how can I "enlargen" the scope of my capture, such that I can programmatically get the "<table><tr><td>" part as well as the "is good</td></tr>" part?
I'd like to find certain keywords in the text of an html page and give it an underline and the ability to show a tooltip when hovered. When I try to use .text() on the top-level element, it just spits everything out, including javascript, etc. How can I go through line-by-line and do a word comparison with the keyword I'd like highlighted? I'm thinking of basically doing: $(#toplevel).each(function () { if ($(this).text() == 'keyword') $(this).contents().filter(return this.nodeType == 3).wrap('<a></a>'); If that makes any sense.
Question 1 ---------------- I am writing an advanced BBCode system for my forums and I would like to be able to find where the cursor was positioned last in the text so I could insert the BBCode there.
Question 2 ---------------- Again I am writing an advanced BBCode system for my forums and I would like to make is so that when someone puts in a [b] tag it goes bold, so kind of a WYSIWYG editor and also for other things like [img] tags and [url] tags. So could someone tell me how to do that. I would preferably like it to still use the textarea tag, or at least a form component so my existing code works.
I want to get the cursor start and end position of a selected range in a text-field or text-area. i tried lot of functions in various forums. but when the last character of the selection is a new line character JavaScript ignore it in IE6. any one having idea ?
I'm trying to 'wrap tags' around text in a text box.
<script language=javascript> function insertFauxTags(fauxTag, e, endFauxTag) { var e = document.frmAddNewForum.txtTopicMessage.selected; document.frmAddNewForum.txtTopicMessage.Value += fauxTag + e + endFauxTag; } </script>
<a href="javascript:insertFauxTags('[p]' + e + '[/p]')"><img src="http://www.<%=strSiteName%>/images/parabutton.gif" border="0" alt="Paragraph" /></a> When I run this in FF I get 'e' is not defined - any ideas?
Is there a way to tell if the text in a text box has been selected forwards or backwards?If you select some text from left to right and then hold down shift and use the cursor keys the right end of the selection moves. If you select some text from right to left and then hold down shift and use the cursor keys the left end of the selection moves.Is there a way in Javascript to detect which way the text has been selected? I need to know if the "end" position is before the "start" position or after. Using ranges and selection objects seems to "normalise" the selection so that the start is before the end.
I have a select box with a few options. When the page loads I need to get the selected option in this select box and alert its inner text. Yet everything I try out on the net that should work wont work in IE, all other browser its fine. show me the TRUE and correct way to get the inner text of a option from a select box in IE?
et me know how can I highlight a selected portion of an html document with javascript such that the selected portion is repeatedly shown highlighted on each and every page refresh.
function copyit() { if (bBool) { tempstore=copiedtext document.execCommand("Copy") copiedtext=window.clipboardData.getData("Text"); bBool=false; } } How to unselect the text after the text was copied?
I found this code on some web site which actually works on my current Safari browser. I will be grateful if anyone out there with IE version 8 or less can verify it working as well.
Basically I wanted to highlight some text with mouse drag, and have that piece of text wrapped with [high] at the beginning and [/high] at the end.
I have a textarea and some buttons. The buttons apply functions to the text the user selects, i.e. the good old "wrap with a tag" thing we all have seen in 100 different editors.
Trouble is, when I click the button, the selected text gets unselected. Select some text in the textbox and click -anywhere- and the text unselects.