Hello,
I'm trying to assign strings to array elements in javascript. It works in Firefox but in IE it throws "Unknown runtime error". - sContent = '<p>this is a features test post.</p><p><a title="test" href="http://url.com">link</a></p>';
-
-
g_ImageTable[g_imax++] = new Array ('<?php echo $sFeatureImgUrl; ?>', '<?php echo $iId; ?>', '<?php echo $sPermalink; ?>', '<?php echo $sTitle; ?>', sContent, '<?php echo $sCategory; ?>', '<?php echo $sTime; ?>', '<?php echo $sAuthor; ?>');
Then it breaks when I try to use that array entry - - getobject("Ath_PostContent").innerHTML = g_ImageTable[g_iimg][4];
sContent is offset 4 and in debugging, that's where it dies.
The contents of sContent at that time are
[HTML]"<p>another feature post. another feature post. another feature post. another feature post. another feature post. another feature post. another feature post. another feature post. another feature post. another feature post. another feature post. another feature post.</p>"[/HTML]
I'm not quite sure what else to try.
Any ideas?
3 1905 Banfa 9,065
Recognized Expert Moderator Expert
It would be helpful to see the actual source code that the browser is seeing rather than the code before it has been run through the PHP.
It would be helpful to see the actual source code that the browser is seeing rather than the code before it has been run through the PHP.
Sure thing - sorry - sContent = '<p>this is a features test post.</p><p><a title="test" href="http://url.com">link</a></p>';
-
g_ImageTable[g_imax++] = new Array ('http://www.url.com/2.jpg', '4', 'http://url.com/features/this-is-a-feature-test/', 'this is a feature test', sContent, '<a href=\"http://url.com/category/features/\" title=\"View all posts in features\" rel=\"category tag\">features</a>', 'September 10th, 2006 at 8:09pm', 'optimus');
Geez, it so happens that my .innerHTML was pointing at a span. When I changed it to a div it worked fine. - getobject("Ath_PostContent").innerHTML = g_ImageTable[g_iimg][4];
before: - <p align="center"><b>Ath_PostContent:</b> <span id="Ath_PostContent"> </span> </p>
after: - <p align="center"><b>Ath_PostContent:</b> <div id="Ath_PostContent"> </div> </p>
Sorry to waste anyones time.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Christopher Benson-Manica |
last post by:
Why would this code...
Date.prototype.addDays=function( days ) {
this.setDate( this.getDate()+days );
}
....break the Date constructor? If I don't include it, everything
is fine. If I do, alert( new Date() ); gives me an empty string.
What in the holy heck gives? (Sorry - I just wasted half an hour
tracking down a problem caused by changing an == null to an ===
|
by: thomastk |
last post by:
Hi,
In the following script, I am trying to set selection to a select
option element, that is newly created within the script. It works fine
on IE installations on Windows 2000 and some XP machines. But on some
XP machines, the selection doesn't happen and it defaults to the first
element in the options array. Has anybody come across this problem ?
Any known workarounds?
Thanks
Thomas.
|
by: Ron L |
last post by:
We are working on a distributed VB.Net application which will access a SQL
database located on a known server. Each client will run on the user's
local machine. To implement this, we are trying to use remoting for our
access to the SQL server, with the remoting being via IIS. Since all of our
users will have accounts in the destination domain, we want to have IIS
handle the security for us and not allow anonymous. We have set this up...
|
by: PD |
last post by:
I am trying to stream out a PDF file via the response object and when I
execute the code it always brings up the first document that I pulled
up.Even when I step through the code, I can see the new values in
theData string array (see code below), but it serves up the first
document that I had run this code with. I streamed theData into a text
file to look at the values and it contained the appropriate ones for
the new document. Even when I...
|
by: ajikoe |
last post by:
Hi,
I tried to follow the example in swig homepage.
I found error which I don't understand.
I use bcc32, I already include directory where my python.h exist in
bcc32.cfg.
/* File : example.c */
#include <time.h>
| |
by: rory |
last post by:
Have the following setting in my app.config:
<setting name="Scenes" serializeAs="Xml">
<value>
<ArrayOfString
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>State
Img;c:\scenes\Scene1\;5000;1;0;0;0;3</string>
<string>Local
|
by: Segfahlt |
last post by:
I need a little help here please.
I have 2 win forms user controls in 2 different projects that I'm hosting in
2 different virtual directories. The controls have been test and operate okay
in both projects.
Both controls(dlls) have been signed using SN.exe and I've set up the
appropriate .Net assembly permissions using those Strong Names
The DLL's have been copied to the /bin directory in both web virtual
directories.
|
by: jesdynf |
last post by:
I'm having trouble applying a stylesheet to content I'm generating
after the fact.
Here's the sample code:
<html>
<head>
<title>CSS/DOM Problem Example</title>
<style type="text/css">
..historylinks {
|
by: Filemaxor |
last post by:
I have gotten my code to be able to allow people to add new text to a .txt document and able to call up files so the user can see whats in it. The problem i'm having is getting the for loop to work correctly so that i can allow certain indexes to be removed without completely deleting everything else.
This is what i have so far.
Code is below
It's in the e part of the code and I have //remed the location of the for loop containg the...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |