473,587 Members | 2,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

updating data in object


Hi,

First I have an object element:

<object id='mC' class='content2 '
data='index.htm ' type='text/html' style=''>
</object>

And a link with onclick:

<a href="../CFR/next.htm" class='button2'
onclick="first( );return false;"

then a script:

function first() {
document.getEle mentById("mC"). data="../CFR/next.htm";
}

Why does this only work, where works is when the new html replaces the old
html, in Firefox?

If i cut the return false IE and Safari replace the entire page.

Thank You and Best Regards,
Joe
Oct 11 '08 #1
4 1349
Joe D Williams wrote:
First I have an object element:

<object id='mC' class='content2 '
data='index.htm ' type='text/html' style=''>
The `style' attribute value MUST NOT be empty. Remove the attribute
specification or specify a value that complies with the standard.
</object>

And a link with onclick:

<a href="../CFR/next.htm" class='button2'
onclick="first( );return false;"
onclick="first( this.href); return false;"
then a script:

function first() {
function first(s)
{
document.getEle mentById("mC"). data="../CFR/next.htm";
document.getEle mentById("mC"). data = s;

is easier to maintain. You might also want to do a feature test with
fallback on document.getEle mentById().
}

Why does this only work, where works is when the new html replaces the old
html, in Firefox?
Switching from "http://localhost/" to "http://www.google.com/" on
"http://www.w3.org/" (dynamically created) *WFM* in "Mozilla/5.0 (Windows;
U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3".

You must be doing something else wrong.
If i cut the return false IE and Safari replace the entire page.
Gecko-based UAs do that, too. Works as designed, since the default action
for the hyperlink was not prevented.
PointedEars
--
var bugRiddenCrashP ronePieceOfJunk = (
navigator.userA gent.indexOf('M SIE 5') != -1
&& navigator.userA gent.indexOf('M ac') != -1
) // Plone, register_functi on.js:16
Oct 11 '08 #2
On 2008-10-11 11:55, Thomas 'PointedEars' Lahn wrote:
>Why does this only work, where works is when the new html replaces
the old html, in Firefox?

Switching from "http://localhost/" to "http://www.google.com/" on
"http://www.w3.org/" (dynamically created) *WFM* in "Mozilla/5.0
(Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417
Firefox/3.0.3".

You must be doing something else wrong.
That's what he wrote, it was working in Firefox, but not Safari or IE.

Changing .data on that <objectdoesn' t appear to be well supported at
all in current browsers:

Firefox 2.0.0.15/Linux no
Firefox 3.0.3/WinXP yes
Safari 3.1/WinXP yes
Opera 9.5/Linux yes
Internet Explorer 6/WinXP no (and issues 2 warnings)
Internet Explorer 7/WinXP no (doesn't load external data at all)

Looks like it would be simpler to just use an Iframe.
- Conrad
Oct 11 '08 #3
Conrad Lender wrote:
On 2008-10-11 11:55, Thomas 'PointedEars' Lahn wrote:
>>Why does this only work, where works is when the new html replaces
the old html, in Firefox?
Switching from "http://localhost/" to "http://www.google.com/" on
"http://www.w3.org/" (dynamically created) *WFM* in "Mozilla/5.0
(Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417
Firefox/3.0.3".

You must be doing something else wrong.

That's what he wrote, it was working in Firefox, but not Safari or IE.
ACK, my bad. A bit complicated wording, though.
[...]
Looks like it would be simpler to just use an Iframe.
Full ACK.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Oct 11 '08 #4
>>"Thomas 'PointedEars' Lahn" <Po*********@we b.dewrote in message
news:48****** ********@Pointe dEars.de...
>>Joe D Williams wrote:
First I have an object element:

<object id='mC' class='content2 '
data='index.htm ' type='text/html' style=''>

The `style' attribute value MUST NOT be empty. Remove the attribute
specificatio n or specify a value that complies with the standard.
>></object>

And a link with onclick:

<a href="../CFR/next.htm" class='button2'
onclick="firs t();return false;"

onclick="first( this.href); return false;"
>>then a script:

function first() {

function first(s)
>> {

document.getE lementById("mC" ).data="../CFR/next.htm";

document.getEle mentById("mC"). data = s;

is easier to maintain. You might also want to do a feature test with
fallback on document.getEle mentById().
>>}
Thanks for that this. I knew I was putting the full url in href for a good
reason.
>>>
Why does this only work, where works is when the new html replaces the
old
html, in Firefox?
>You must be doing something else wrong.
>>If i cut the return false IE and Safari replace the entire page.

Gecko-based UAs do that, too. Works as designed, since the default
action
for the hyperlink was not prevented.
>Conrad Lender wrote
Changing .data on that <objectdoesn' t appear to be well supported at
all in current browsers:
Firefox 2.0.0.15/Linux no
Firefox 3.0.3/WinXP yes
Safari 3.1/WinXP yes
Opera 9.5/Linux yes
Internet Explorer 6/WinXP no (and issues 2 warnings)
Internet Explorer 7/WinXP no (doesn't load external data at all)
Looks like it would be simpler to just use an Iframe.
Add IE8 to the no work list.

I did not expect a failure using object here. I was looking for a param to
use for the target url.

I am back in the land of iframes.

Thanks Again and Best Regards,
Joe
Oct 11 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1791
by: Jon Agiato | last post by:
Hi, I am trying to use a data grid in a web application in which I have three tiers. The DataGrid is not set up to a data source, or a data adapter, so everytime I make a change I send the cell information to another object which forms an SQL query and makes the query to the DB (actually to a DBFacade object). In any case, please see the code I have listed below for my update DataGrid event. With this code, the DB is updated using the old...
5
2020
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated one row, all of them were updated so i immediatelly figured out that i have to include the id of every entry in the update statement. This is where the problem is raised. My database is an Access database. The table i am updating contains a Date...
3
2221
by: adam222 | last post by:
hello, i have a web-form with a GridView control, i wanted to update & delete, using the AutoGenerateEditButton. when i used it with sqlDataSource (executing SP in the DB) it works like a charm, but when i want to pass the data through the application's layers (BL etc.), it did not work. it seems that the 'AutoGenerateEditButton' is capable only with sqlDataSource...
5
12505
by: Mark R. Dawson | last post by:
Hi all, I may be missing something with how databinding works but I have bound a datasource to a control and everything is great, the control updates to reflect the state of my datasource when I update the datasource - awesome, but I have an issue with updating from a different thread. Here is my datasource, a person class that raises the PropertyChanged event: class Person : INotifyPropertyChanged {
0
1370
by: Michael Kellogg | last post by:
I have a problem wherein a query that updates a GridView doesn't seem to really stay in sync with a label I have above the GridView. I have a GridView object that I'm updating with information whenever my user enters a job number into a textbox and hits a button. There is a SQLDataSource object on the page that does the retrieval of the data, and the job number parameter for its query is bound to the textbox "Text" value. In the button...
1
1959
by: batista | last post by:
Hello all, I have a third praty grid control...named C1grid. Im using it in one of my apps.. Now, I have bind this grid to a custom dataset class named "DataViewEx". The code of the class is below... Now what happens is that im updating this dataviewex class from a separate thread.....
2
4363
by: toddw607 | last post by:
Hi Everyone! I have a ASP.NET webform that brings data in from SQL Server 2000 and displays it on a page. I want to update the webpage while in IE using the following code: <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SqlClient" %> <%@ Import Namespace="System.Data.OleDb" %> <html>
3
1873
by: Trez | last post by:
Hey guys, Am new at using ASP.Net. am having some problems updating my SQL DB. whenever i try i get this Error. Can someone help me? Incorrect syntax near 'nvarchar'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax...
1
1776
by: Neil Chambers | last post by:
This is more likely a question for an SQL group but as I'm using powershell and dotnet it may be relevant Overview: I'm trying to pull data from Excel into a DataSet - modifying the DataSet - then updating the excel source I have got to the point where I think I need Update and Delete Command strings for the DataAdapter but I'm at a loss as to what to do
1
2358
by: jonbartlam | last post by:
Hi There I'm not sure what exactly is going wrong here. I'm writing an application that retreives a table from a database (tbl_internalfaults) and updates it. (Actually, just the status column will need updating with 'CLOSED' where necessary.) I have been trying to use the OLEDB command builder to build the statement to update the database however it is returning an error whenever I try to do this. I already have a dataset full of data, 1...
0
7857
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,...
0
8220
Oralloy
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...
0
8352
jinu1996
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...
1
7981
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,...
0
6632
agi2029
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...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2367
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
1
1457
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1194
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.