Not Allowing Html In Text Box
Oct 6, 2006I am making this comment thing and i did not want to allow html to be posted is there any way that i can make it do that by not letting them put html in the text box?
View 4 RepliesI am making this comment thing and i did not want to allow html to be posted is there any way that i can make it do that by not letting them put html in the text box?
View 4 RepliesYou know how there are a dozen ways to have tabs (tab1, tab2, tab3, etc.) that when you click or mouse over them the text in the area below the tabs changes according to each tab?
Well I've been trying to find some code that allows you NOT to have a visible tab1 but still allows you to have the text below it. Essentially it would be the default text on the page, and then when you select a tab, then the text in that space changes to match that tab. but until then its just default text that isn't tied to any tab. Since all the codes seem to employ the Unordered list, there doesn't seem to be a way to have some default text with a corresponding <li> list element (the tab).
Does anyone know of a way to achieve this? I wish I could show you my web page but I'm a newbie and not allow to include URLs in my posts yet.
I have been given the task of creating an online coupon system. The only
real challenge that I can identify at this point is allowing only one coupon
to be printed rather than several times. Because printing is done on the
client side, I thought that it would make sense to post this to newsgroups
that cater to the JavaScript folk. Can anyone out there point me to how I
would enforce this, that is, allowing only one coupon to be printed.
Someone told me to look at the window.print() method.
iw ant to have a function so that user can only enter numbers in the text box and + ( only once in the beggininging). if user wants to add + he can only enter + once as the first character like +123 or 123 bt cannot enter 1+2 or 123+ or +123+
View 4 Replies View RelatedIs there a way to remove text portion from the HTML keeping the HTML
Tags using the browser, say javascript RegEx or something ?
I have seen lot of examples removing HTML tags to get the text but how
the reverse of it?
Via ajax, data equals <h1>Special</h1>
Code JavaScript:
function searchReplaceAndDisplay(data) {
data.replace('<','<');
data.replace('>','>');
$('#modal').append(data);
}
$.get('getSpecialsHtml.aspx', searchReplaceAndDisplay);
Right now #modal displays <h1>Special</h1>, as plain text.
How can I get #modal to display 'Special' marked up as an h1 element instead of text?
I create eLearning materials which are given away as a communty service to help people improve their health. A typical eLearning project has a few educational screens (using a Learner Management System-LMS-template) and an interactive exercise (on an external web page-htm or html-usually accessed by button which navigates to the exercise's URL).
The interactive exercise should only be accessed from inside the eLearning lesson using the button, because it requires understanding of the way it works plus important cautions to assure proper use. I need to prevent the use of the URL outside of taking the lesson (for example, someone taking the lesson acquires the exercise's URL from their browser history and then may give this to others who access the exercise directly-without necessary knowledge and cautions).
I tried document.referrer, using JavaScript. Using the referrer URL from inside the lesson and adding the JavaScript to the exercise's htm code worked OK in FF, but not in IE 8. In FF, if the referrer was not the correct single URL from inside the lesson, then it redirected; if the correct URL, the exercise appears.
The JS code follows:
<script language="JavaScript" type="text/javascript">
<!--
var oksite = "http://www.mysite.com/xyz/courseidxxxxx/yyyy/zzz.html";
[code]....
In IE 8, I was not able to get it to work. Using an alert, I noticed that the referrer in IE 8 was blank.My web hosting (GoDaddy) is a shared Windows hosting. I would have to upgrade from IIS6 to IIS7 to use PHP. Bigger challenge: I've never used PHP. If possible, I would prefer to use JS. But, I am open to any suggestion that will help.I am also wondering if part of the IE 8 issue is that I am using IE 8 X 64?
I an using the datepicker, [URL] . Does anybody know if there is a way for me to configure this so it will only show Mondays ? Basically I want a user to select a date, but the date must be a monday.
View 4 Replies View RelatedI'm using jquery height() function to make it so that a div inside my page fills the gap between the header and footer (which are fixed height) so that the entire page is fullscreen. However I want any content in that div to overflow:auto; When I set the css to overflow:auto; the div disappears totally.$("#col3_tab").height( contentH-$("#col3_content").outerHeight() );contentH is simply the sum height of the header and footer and #col3_content is a fixed height div above the div I want to be auto scroll.
#col3_tab {
width: 100%;
background-color:#CC99CC;
[code]....
I'm using this function to allow only numbers to be written in a textbox, however i want to allow lowercase "a" and "b" also with the numbers.. is it possible with this function?
View 5 Replies View RelatedI'm trying to allow a user to select an XML file so that my javascript can parse it and create some pins for a google map. It works fine in Firefox, and by using FireBug I can see that the file is being accessed as expected. IE on the other hand tells me that "'files.0' is null or not an object" on line 68 of address-locator.php...Here's a link to the page: Address Locator (I've attached the files as well in a zip archive)and a sampling of the XML file I'm loading:
HTML Code:
<?xml version="1.0" encoding="UTF-8"?>
<barList>
<establishment>
[code]....
<h1>November<span>2009</span></h1>
making a variable equal the h1 html() without the span text.
// equals 'November2009'
var monthDelete = $('h1').html();
// I need just 'November'
I am creating a small CMS module for a client. I created a little form and when they click Submit, it goes straight out into an include (.inc) file, which is connected to the web page to be displayed.
The trouble I am having is that I'd like to create an additional button that will insert some text (certain html tags to make their life easier, etc) - I got it to work, actually. The script executes and the text is inserted - but once the script runs and the page refreshes (or whatever it does), the text then disappears. The only way I can seem to get it to stay put is when I use "onmouseup" instead of "onclick" - which means that every time the user accidentally mouses over the thing, it inserts the text.
I got a problem while renendering a menu and combobox on a page. The
problem is stated below.
As per my requirement I have to display a menu on top of the page and
a combo box just below it. While dragging the mouse over the menu, the
submenu items should appear over the combobox. I go for ZINDEX, assign
a lower ZINDEX to the combo box than that of the menu, but still the
combobox appears over the menu items.
Can we have an alternate for it?
I look for a script allowing to display a page in a frame as from a link in a pop up (and close it in the same time The name of my frame is "body" In the pop up i try this function in the head section :
function reroutage() {
parent.frames["body"].window.location="assistance.htm";
window.close();
}
but it does not works, why?
If I do something like, minDate: new Date(1930, 1-1, 14) or, minDate: '-70Y' The oldest date available will be 1999, and no matter what I've tried I've never been able to get beyond this barrier. Is this a limitation of datepicker?
View 1 Replies View RelatedI have an onfocus event that makes a textarea large and then an onblur event that sets it back to a smaller textarea. If I click the textarea the onfocus event is triggered but if I go straight to submit the form the onblur event is triggered and the form is not submitted unless i hit submit twice. How can I get the form to submit? Can I put an "if" statement in the onblur event to see if the form is being submitted then just submit the form otherwise run the onblur event?
Code:
<style type="text/css">
.textarea {
background-color: #ffffff;
color: black;
[Code].....
I was hoping that someone could give me a hand with a regex quetsion. I'm quite new to it all, but managed to get things working pretty much how I would like them except for allowing special characters such etc.
[Code]...
How can I prevent a browser from letting an image drag.I've tried this snippet:document.onmousemove = function() {return false};
View 1 Replies View RelatedI am trying to figure out how to successfully place an image anchor in the following script ---
<script>document.write ("<a href="http://contact."+ domain +"/ws/eBayISAPI.dll?ShowCoreAskSellerQuestion&requested="+ userid +"&iid="+ itemid +"&frm=284&redirect=0&SSPageName=PageAskSellerQuestion_VI"><img src="http://www.thebluedot.net/images/layout/contact_us.gif" style="border:none;"></a>");</script>
[Code]...
I'm relatively new to JQuery and am having troubles trying to get two functions to work together. I have a pagination function and a modal dialog function. Each one is triggered by different anchor tags. My troubles happen whenever one function is triggered, the other function can not be triggered anymore. If I trigger the modal dialog, the pagination function can't be triggered, and when the pagination is triggered first, the modal dialog no longer triggers. I've tried to use .die() and .unbind() on the click events for the opposing function. That seems to work only once. then the opposing function can no longer be triggered. I think I am on the right path, just need to have some guidance on where I'm going wrong.
[Code]...
Currently I am building a mini CMS thing for a client. The areas they are editing deal with links so as the code is being pulled in I replace any:
I am doing this so a person is not in the middle of working on an edit and accidentally clicks a link and all their edits are wiped clean cause they left the page.
Now everything is working just fine and my javascript:void(0) is blocking any links from allowing the use to leave the CMS, well all links except ones that have a url ending in .html
So again all:
Any reason why the javascript void wont work on urls that have .html but do work with urls that have .php?
I am trying to allow a user to easily uncheck/check all checkboxes in a form by checking or unchecking a checkbox. The checkboxes would be in a form like so:
<form action="" method="post">
<input type="checkbox" name="checked[]" value="1">
<input type="checkbox" name="checked[]" value="2">
<input type="checkbox" name="checked[]" value="3">
<input type="checkbox" name="checked[]" value="4">
</form>
I use an event handler to call a function:
<input type="checkbox" name="checkall" onchange="checkall('checked[]', this.checked)">
And here is the function:
function checkall(box_name, current_state) {
all = document.getElementsByName(box_name);
action = (current_state == "checked") ? "false" : "true";
for (i = 0; i < all.length; i++) {
all[i].checked=action;
}}
The event handler should pass the name of the checkboxes and whether the "check all" checkbox is currently checked or not to the checkall() function. Nothing happens when I check/uncheck the "check all" function.
I'm using the Jquery Validation Plugin on my site, and I have a textfield that validates to only allow numbers. However, that also doesn't allow linebreaks - which I need to have! Is there a way around this?Here's the working code:
[Code]....
Any script which will allow users to increase or decrease the font-size of a site.. Free scripts that I can use...
View 1 Replies View RelatedI have a div that is set to overflow auto allowing the content to scroll left and right. This is because the content I am putting in it (a series of input boxes) is considerably wider than the containing div. The way it sits, when I start in the first input box and continually tab to the other input boxes, the focus goes from the left of the screen to the right. Once it hits the input box to the right of the screen, some of the input box is hidden to the right. As I tab to the input boxes to the right, each one has a portion of the element cut off by the view window.
What I want to happen is when I start at the left most input box and tab over, as I reach the center of the viewable part of the container, I want the input boxes to continue to center themselves until I reach the last ones. I think that telling each input box to center itself in the visible window of the containing div as it gets focus would work, I just don't know if there is an easy way to accomplish this using javascript I am using the mootools framework if that helps my case any.