HTML Textarea Refuses To Cooperate
May 13, 2003
So I got six textareas that are read-only.
Maybe I'm confused, but textareas support onFocus events, correct?
Furthermore, I've got a radio group that has an onChange event. Something like onChange="f(1);"
When a button is selected, the JavaScript function kicks in :
function f(n) {
var x = window.document.forms[0]
var y = new Array()
y[0] = 6
if (n == 1) {
x.text_field.value = y[0]
}
}
This should pop the number 6 into the text_field (which is a textarea), should it not?
View 6 Replies
ADVERTISEMENT
Oct 29, 2011
I'm trying to code a website that will read data from an Excel file (stored either locally or elsewhere) and input a row of data (searched based on a Drop-Down List) into a table on the web page itself. Every time I open the page (it's currently stored on my local drive, on a laptop running Windows 7) in IE8, though, I get the error "Automation Server Can't Create Object" and nothing happens. The Excel file doesn't get opened and the table is blank. Thing is, though, I tried opening the same web page on another computer with IE6 and Windows 2000, and the Script works perfectly there.
I've been searching for a solution to this for a week, and some people suggested elsewhere that it's a problem with IE8's security settings. I lowered them as far as they'll go and enabled Running the Script Not Marked As Safe for all possible zones, same result, the Script refuses to run with the "Automation Server Can't Create Object" error. Here's the applicable lines of code:
function loadData() {
// try {
var Excel, Book;[code]...........
I'm completely stumped, everyone. Is it some obscure setting I'm forgetting to check in IE8, is my Java not fully updated, or what is it? Again, it works perfectly on my old Windows 2000 w/ IE6 computer, but not on a recent Windows 7 laptop with IE8.
View 3 Replies
View Related
Apr 29, 2011
look at my page with a jQuery gallery that refuses to work, however, it works perfectly on my local computer. View Page [URL] What is the problem, and how do I fix it?
View 1 Replies
View Related
Feb 4, 2009
got an one that might prove interesting. I have a window that refuses to close in OSX/Safari 3.1 if it has any history.
Details:
I have an embedded flash app that offers links. These links will initiate a new window. I have little access to the working of the links, so I am assuming that they are using window.open and call the popup page.
So once the window is open, I have a link within that window to close it using an a tag that fires a js function which in turn uses self.close(); See code below. This works well in all cases. The problem comes into play under the following conditions:
1) Mac/Safari 3.1 (note that XP/Safari 3.1 does NOT produce the same issue)
2) Once the window is open, the user clicks a 2nd link from the Flash app, showing the selected html page and adding history to the popup window.
3) The user then tries to close the window, which now fails.
4) Any additional addition to the popups history yields the same results (as one might imagine).
I tried to use javascript to navigate back to the initial history point, and then run self.close. This sort of worked as I would revert back in the history stack with the first click, then the window would close on the second call to the close function. But I couldn't get it to work in one click. I did notice that adding an alert between the history rollback and the self.close() actually allowed this idea to work. So I tried a setTimeout, but did not have success. Seems like there's something there, but I guess I don't understand well enough to come up with the solution.
Code:
function self_close(){
self.close();
}
HTML Code:
<a href="#" onclick='javascript:self_close();return false;'>close</a>
View 2 Replies
View Related
Feb 28, 2011
The function "setEqualHeight" fires on document ready and works well. It sets two columns to equal height. The problem is that I have tabs and accordions in the columns and therefore need to recalculate the column heights after the document is loaded: I try on click but nothing happens. Why?
This works fine:
This does'nt work:
View 12 Replies
View Related
Apr 30, 2009
Anyone here using Visual Studio 2008 to edit Javascript files? Wheneven I try to edit a .JS file (regardless of whether I've created it inside VS2008 or imported it), I get the tab with the file name, but the content doesn't update. I just see the contents of the previous tab, and if I type something, press save, rename the .JS file to something else and open it again, it turns out whatever I typed in is there.
If I "Open with..." the file, selecting source code editor instead of the default script editor, the file shows up fine, and I can work with it, but sadly without intellisense and color mark-up... Which sort of defeats the whole point of buying VS2008. I've tried the repair option from the VS2008 DVD, but no difference.
I'm using VS2008 v9.0.30729.1 SP1 on a swedish XP Pro SP2, tried restarting VS2008, rebooting etc, nothing helps. One workaround for me is to enclose the javascript in HTML "<script>" tags and renaming the file .htm and include it that way, but that's... ugly and ..
View 2 Replies
View Related
Oct 24, 2007
I have a textarea and I would like to prevent users from inserting HTML tags. Only plain text is supported. Which client-side js regular expression is best for this?
View 1 Replies
View Related
Nov 7, 2010
if I have this inside TD tag.what should I write instead ??? to reproduce new line in textarea.
View 2 Replies
View Related
Aug 4, 2005
I have a PHP/MySQL-based content management system that alows one to edit pages of a website through form textareas. I was wondering if it is possible to change the appearance of HTML tags inside the textarea so the HTML markup looks different (e.g., in grey), making it easier to quickly find and edit the 'real' content without messing up the tag (like accidentally deleting a '>' character).
View 1 Replies
View Related
Jul 24, 2008
how can i write the sourcecode of the page to a textarea?i thought about something like
Code:
function dump()
{
[code]....
View 14 Replies
View Related
Jul 20, 2005
I'm using a control called HTMLArea which allows a person to enter
text and converts the format instructions to html tags. Most of my
users know nothing about html so this is perfect for my use. Code:
View 15 Replies
View Related
Jul 20, 2005
I have a text area and I want prevent people from entering HTML text in the text area....
View 3 Replies
View Related
Oct 3, 2009
I have a website with an admin area for my clients. The input text is then inserted in a page on their website - inside a <p> tag. What I'm trying to do is locate a script that would allow them to use such tags as <b>, <i>, <u>, but not others like <p>, <div>, etc. Does someone know of such a script?
View 1 Replies
View Related
Nov 14, 2011
I have a script (more of a web app) which generates a customized table element. I want the user to be able to "save" this table. Thus far, what I am doing is getting the HTML of the table and displaying in a textarea for the user to cut and paste to a text editor. This is fine, except, I worry many in my target audience wont know how to use a text editor, or make plain text, or save as HTML.. etc. So I was hoping to use .js to open a new window and write in the HTML so that the users could merely do a FILE>SAVE PAGE AS directly from their browsers.
I suppose I have two questions:
1) How do I document.write to a NEW window??
2) I have noticed that when you use.js to generate HTML, it doesn't show in the view source , thus it wont "save as" anything else but a BLANK doc. How to make generated HTML "visible" so that it can be saved.
View 2 Replies
View Related
May 13, 2011
I'd like to create a textarea and a division so that whatever embed code you put in the textarea it gets executed on the division in real-time.
View 14 Replies
View Related
Sep 19, 2011
I have web form (not MVC) that has bunch of textarea and textboxes where user can input HTML markup. For example, a textarea is provided so users can put YouTube embed iframe html tag where it will be shown on their profile. The problem is that asp.net 4.0 http request validation doesn't like things like ">" or "<", etc. I can put pagevalidation="false" on the page and/or revert back to .net 2.0 validation but why would I want to do that since I have geniuses like you guys that can show me how to do what I want with jquery without jeopardizing security.
So what I want to do is form a handler so when the form is submitted, the content of the textboxes and textarea on the page be encoded (i.e. > to > etc.) before the submission to the asp.net 4.0 so we can keep the httprequest validation stuff happy. I have added a class "mustEncode" to each of the textarea and textboxes.
View 4 Replies
View Related
Mar 10, 2010
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.
View 6 Replies
View Related
May 13, 2011
How would i change back to the default length of textarea?
I have this comment area that after clicking submit i will append the new comment in the list of comments through ajax... i got one problem though, everything is working perfectly well except for the textarea that won't change back to it's default size...
EXAMPLE:
The problem is that the textareawon't change back to it's default size // let's say that the default size is rows=3
View 2 Replies
View Related
Nov 5, 2009
I've been trying to fix this.
Code below:
View 11 Replies
View Related
Aug 25, 2010
I'm building a webpage using javascript and iframes. Basically I have an iframe in the middle of the index.html page that links to another html page (let's call it iframe.html). My question is, is it possible to call a javascript function from iframe.html to control an object on index.html? If so, how do I do this? I'd like to be able to assign an image in iframe.html with the hyperlink of href="javascript:function()", where the function effects the CSS of a div on index.html.
View 2 Replies
View Related
May 16, 2010
I have a web site which main page is index2.html I need a script that when I refresh the page it takes me to index3.html or index#.html in a random fashion. the list of index numbers is 10 so far.
index3
index4
index5
etc etc
View 2 Replies
View Related
Jul 16, 2010
I came across a very odd browser behavior when trying to modify a css class using javascript and at the same time having a base html statement in my html file.Without the base html statement, all browsers work fine and I can change the css class definition using javascript easily.With a base html statement, only FireFox still works while Internet Explorer and Google Chrome dont work anymore. If there is a cross-domain issue, while one browser does work and the others dont? An example of what I'm talking about, with the base statement:
http://freebsdcluster.org/~casaschi/tmp/example-base.html
Without the base statement:
http://freebsdcluster.org/~casaschi/tmp/example-nobase.html
how to tweak the code in the case with the base html statement in order for the javascript to work with all browser (modifying the class definition) ?I want to be able to manipulare css classes with javascript when a base html statement is in my html code.This is essentially the code:
<!--
-->
<base href='http://www.google.com'>
<style id='myStyle' type='text/css'>[code]....
View 10 Replies
View Related
Dec 28, 2010
It appears that .html() is somehow messing up reading the contents of a div.Here is my php code which loads into the div.
$own_pre_selection .= "<input name='" . mysql_result($result,$i,"did") . "' value='" . mysql_result($result,$i,"did") . "' type='hidden'><span class='addremove' onclick="recordchecks('" . mysql_result($result,$i,"dname") . "','" . mysql_result($result,$i,"did") . "')";><u>Remove</u></span> " . mysql_result($result,$i,"dname") . "<br>";
Here is what I see as source code after the page renders.
<input name='677' value='677' type='hidden'><span class='addremove' onclick="recordchecks('Heart Neoplasms','677')";><u>Remove</u></span> Heart Neoplasms<br><input name='1298' value='1298' type='hidden'><span class='addremove' onclick="recordchecks('Heart Septal Defects; Atrial','1298')";><u>Remove</u></span> Heart Septal Defects; Atrial<br></div>
When I test alert() the .html() contents it appears like this. It seems to screw up the quote escape and changes " to " ;="" after the recordchecks().[code]...
So even though the source code looks perfect, if I alert() the div contents with html() it seems to get a bit garbled in the process.
View 2 Replies
View Related
Feb 6, 2011
I would like to ask how do I get the value from a textbox from form.html which contains my iframe and copy the value into another page, test.html ?
View 2 Replies
View Related
Dec 28, 2010
I tried to load 1 html through ajax and javascript and it worked.But i want to load more than one and i cant.I thought that it would be a good idea to put the ajax files to the external websites and put the same load button.I tried this idea but it doesn work.I can only load one external website.
View 2 Replies
View Related
Jul 3, 2011
I have a file that generates web galleries in Adobe Lightroom. They are generated depending on which files are selected and the metadata in those files.
Basically it is a series of pages of thumbnails called index.html index_1.html index_2.html etc.
Then a set of pages for each individual image.
An example can be seen here: [url](the page navigation links are not great, but I have addressed that, they're at the bottom >> )
Currently if a user clicks on a photo there is a 'return to thumbnails button at the top, but this always takes them to /index.html
So the user could be at a picture after browsing to /index_39.html and still get returned to /index
Is there any way I can use history.go to find the last instance of index.html Or index_x.html (where x is any number) and take them back to that instead?
View 1 Replies
View Related