Discussion:
inserting events in table
(too old to reply)
Dave "Crash" Dummy
2016-04-04 19:09:43 UTC
Permalink
Below is a much simplified version of a script I am using to create a
calendar. I would like to add a unique trigger for each cell, the
equivalent of <td onClick=myHandler(j,k)>. Can anybody help?

<table id="cal"></table>
<script type="text/vbs">
for j=0 to 3
cal.insertRow
for k=0 to 6
cal.rows(j).insertCell()
cal.rows(j).cells(k).innerText=7*j+k
next
next
</script>
--
Crash

Life is short. Eat dessert first.
Mayayana
2016-04-04 19:51:05 UTC
Permalink
I'm not sure I follow exactly what you want
to do, but if this code is of any help then you're
welcome to it:

http://www.jsware.net/jsware/scrfiles.php5#ezplan

For dynamically created TDs you might look
at the editor here:

http://www.jsware.net/jsware/msicode.php5

See the MSI editor download.
It's an HTA that's an editor for MSIs. An MSI
acts like a database, with numerous tables,
each having a distinct number of columns and
rows. So to work as an editor the TRs and TDs
have to be loaded dynamically, depending on
which table is selected. Each column/row item
must also be editable. That's how the editor works.
(You can try it out with any MSI file. It won't
change the file unless you change a value.)
Dave "Crash" Dummy
2016-04-04 21:13:08 UTC
Permalink
Post by Mayayana
I'm not sure I follow exactly what you want
to do, but if this code is of any help then you're
http://www.jsware.net/jsware/scrfiles.php5#ezplan
For dynamically created TDs you might look
http://www.jsware.net/jsware/msicode.php5
See the MSI editor download.
It's an HTA that's an editor for MSIs. An MSI
acts like a database, with numerous tables,
each having a distinct number of columns and
rows. So to work as an editor the TRs and TDs
have to be loaded dynamically, depending on
which table is selected. Each column/row item
must also be editable. That's how the editor works.
(You can try it out with any MSI file. It won't
change the file unless you change a value.)
"Sorry for the inconvenience...
We cannot support your browser. "

I am running IE 11. Strange that a page about VBS won't host the only
browser that runs VBScript.
--
Crash

A line in the sand doesn't mean much if it disappears at high tide.
Mayayana
2016-04-04 22:25:41 UTC
Permalink
| "Sorry for the inconvenience...
| We cannot support your browser. "
|
| I am running IE 11. Strange that a page about VBS won't host the only
| browser that runs VBScript.
|

It doesn't support IE11 because IE11 *does not*
run VBScript. That's the reason. Did you read the
rest? You can set IE10 compatibility in IE11 or you
can use any other browser.

Basically, Microsoft have broken
compatibility with their own standards and
technology, ending VBS support as well as quirks
mode support. They're even using a trick
userAgent string to pretend that it's not IE.
But IE11/Edge are IE, and if I wanted to support
them it would require a lot of work. It would
also require that I get a Win10 machine for
access to Edge. (I might do that if Mr. Nadella
offers to pay me, but so far he hasn't called. :)

IE11 still has VBS and still runs HTAs. But
VBS is disabled under normal conditions.
It's crazy. They're trying to gain credibility as
a standards-compliant browser and breaking
their own standards to do it.

Several years ago I had to use script for IE
in order to make the "flyout" menus work. Not
every version of IE supports that CSS. So I
have two versions of all pages: VBS menus
for IE in quirks mode and no-script CSS menus
for all other browsers. The result is that I can
support virtually all browsers in use consistently,
with one page version or the other. But I had to
do some complex coding to achieve it, using
redundant table/div combinations to accomodate
behavior in IE vs all other browsers. Now, with
IE11 and Edge, Microsoft have broken all that.
But it can be regained in IE11 with compatibility
mode. I don't think there's any hope for Edge.
Good riddance.

I had to make a decision: I could rewrite the
whole site for IE11/Edge, in which case I'd need
to test in those browsers and probably maintain
3 versions of every page -- one for IE10 and
under, one for IE11/Edge and one for all other
browsers.... Or I could just not offer support
for IE11/Edge. I chose the latter.

Anyway.... lots of technical details, but the
long and the short of it is that there are still many
ways to easily access my site. Unlike most
sites, there are no ads, spyware, web bugs, cookies,
and no script if you use a non-IE browser. It's
just simple HTML and CSS code that's all been
widely supported for a long time. I'm unlikely to
ever undertake the effort required to rework all
that just to accomodate IE11/Edge.
Dave "Crash" Dummy
2016-04-05 15:16:06 UTC
Permalink
Post by Mayayana
| "Sorry for the inconvenience...
| We cannot support your browser. "
|
| I am running IE 11. Strange that a page about VBS won't host the only
| browser that runs VBScript.
|
It doesn't support IE11 because IE11 *does not*
run VBScript. That's the reason. Did you read the
rest? You can set IE10 compatibility in IE11 or you
can use any other browser.
<snipped>

Okay, I made the sites compatible. I'll take a look at your calendar
script and see if it answers my question.
--
Crash

This email is free from viruses and malware
until I learn how to include them.
Loading...