I want to be able to embed a single quote into an INPUT element
within a dynamically generated IFRAME. The example below
shows how the IFRAME is generated.
Challenge: I'd like the alert box to show: Mom said, "Don't"
instead of the current: Mom said, "Do not".
The point of the exercise is that I will be passing arbitrary
strings to the IFRAME and I want to ensure that the final
string is the same as the original. So I'm interested in dealing
with all the troublemaker characters.
Thanks,
Csaba Gabor from New York
PS. The point of the alert is to validate that everything
is copasetic with the IFRAME.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TI TLE>IFrame test page</TITLE>
<META http-equiv=Content-Type
content="text/html; charset=windows-1252">
<SCRIPT type="text/javascript">
function makeIframe() {
var iframe = document.create Element("IFRAME ");
iframe.src = "javascript:'<H TML><HEAD>";
iframe.src += "<TITLE>Dyn amic IFrame</TITLE>";
iframe.src += '</HEAD><BODY onLoad="alert(' ;
iframe.src += 'document.getEl ementById(';
iframe.src += '"myInput& quot;).value)"> ';
iframe.src += '<FORM method=get action=dummy.ph p>';
iframe.src += "<input type=text id=" + "myInput ";
iframe.src += 'value="Mom said, "Do not"">';
iframe.src += "</FORM></BODY></HTML>'"
document.body.a ppendChild(ifra me);
}
</SCRIPT>
</HEAD><BODY style="margin:5 %" onLoad="makeIfr ame()">
Main Body
</BODY>
</HTML> 2 9365
A solution to the specific problem is to replace the
Do not (8 lines before the </HTML>)
with
Don\x5Cx27t
Csaba
PS. I've been testing on IE 5.5
"Csaba2000" <ne**@CsabaGabo r.com> wrote in message news:bl******** @dispatch.conce ntric.net... I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated.
Challenge: I'd like the alert box to show: Mom said, "Don't" instead of the current: Mom said, "Do not".
The point of the exercise is that I will be passing arbitrary strings to the IFRAME and I want to ensure that the final string is the same as the original. So I'm interested in dealing with all the troublemaker characters.
Thanks, Csaba Gabor from New York
PS. The point of the alert is to validate that everything is copasetic with the IFRAME. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TI TLE>IFrame test page</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <SCRIPT type="text/javascript"> function makeIframe() { var iframe = document.create Element("IFRAME "); iframe.src = "javascript:'<H TML><HEAD>"; iframe.src += "<TITLE>Dyn amic IFrame</TITLE>"; iframe.src += '</HEAD><BODY onLoad="alert(' ; iframe.src += 'document.getEl ementById('; iframe.src += '"myInput& quot;).value)"> '; iframe.src += '<FORM method=get action=dummy.ph p>'; iframe.src += "<input type=text id=" + "myInput "; iframe.src += 'value="Mom said, "Do not"">'; iframe.src += "</FORM></BODY></HTML>'" document.body.a ppendChild(ifra me); } </SCRIPT> </HEAD><BODY style="margin:5 %" onLoad="makeIfr ame()"> Main Body </BODY> </HTML>
Try:
iframe.src += 'value="Mom said, "Don\'t&qu ot;">';
-Wagner This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ubccis |
last post by:
Hi.
I'm wondering if you can dynamically query a database with javascript
and php. For example, can I select something on the select menu and
dynamically query the database and populate another select box without
reloading the page?
|
by: Templar |
last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and
then put som raw HTML into it. But I can't.
When I create iframe, I can't access its properties.
Here's the coe snipplet:
//*************************************
//*************************************
|
by: Tony Sutton |
last post by:
I have this following code in my html file:
<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#
version=7,0,0,0" width="320" height="320">
<param name="src" value="file.dcr" />
<embed src="file.dcr"
pluginspage="http://www.macromedia.com/go/getflashplayer" width="320"
height="320">
</embed>
|
by: Anna |
last post by:
Hi all.
I don't have a very deep understanding of CSS and this question might
sound stupid for you. Sorry for that.
Can the overflow CSS property be applied to the embed tag?
I have an embed tag whose source is big SVG file, whose dimensions are unknown.
If it is bigger than the screen, the rest of the SVG is clipped and not shown.
I would like to force the embed tag to scroll in that case.
|
by: Ryh |
last post by:
I have the following scritpt. It hides div layer when mouse is out of
the div layer. Inside DIV I have IFRAME box. Unfortuantely it does not
work in Mozilla or IE 5.5. It hides div when cursor is inside IFRAME.
NOte that IFRAME is inside DIV so it should not hide DIV. It Works
fine in IE6.0.
Could any one help?
Example:
| |
by: shlomi.schwartz |
last post by:
using this example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test Page</title>
</head>
|
by: Testing12340 |
last post by:
Hello!,
I have this well, little IE issue.
I'm showing hiding div's (containing IFRAMES), however, for some reason in IE one of the iframe contents allow me to click them (the last one allows me to browse the contents) the others I can't do anything with :(, it's like there is still a layer present (invisible)
It works fine in FF
If someone knows the answer, THANKS!
|
by: emorgoch |
last post by:
Hi there.
I'm currently working on a project involving rebuilding our local
intranet site. The site was originally developed using frames, defining
a header, sidebar, and content area, which I've been working to replace
using ASP.NET master pages.
Right now I'm trying to find a solution for some of our older and
externally linked content. A good proportion of this content get loaded
into the content frame, leaving the header and...
|
by: matwilko |
last post by:
hi, i am trying to create a simple version of itunes...and i am using iframes to do this. I have already set up the iframes using dreamweaver and used a drop-down menu to select the genre. When selecting the genre the artists appears in iframe1...and i want to be able to select the artist so that the songs appear. I am unsure of how to do this, could anybody help?
Thanks
Here is my current code...
<html>
<head>
<title>MiTunes</title>...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |