Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
lfirth #1
Extension only works once
Hi, I have been toying with creating my own extensions and have created a
simple one that creates one line of VBScript code from a single variable. I
have two problems. The first one is that it only will place the code in the
"Body" of the web page. i.e. not between the <% %> ASP tags and two it only
works once. If you try and use it a second time it doesn't work, yet if you
wait for 10 minutes or so, it works again.
lfirth Guest
-
DM6.0 Extension Manager v1.2.107 not d/l newer extension
Hi Folks, I have not been on line due to back surgery and recovery (ouch, yes it still hurts) I have tried to down load some newer navigation aids... -
#39370 [NEW]: $_GET no longer works under FastCGI but works under CGI.
From: trustpunk at gmail dot com Operating system: Windows PHP version: 6CVS-2006-11-04 (snap) PHP Bug Type: CGI related Bug... -
#26240 [Opn->Bgs]: Functions of XSL-extension didn't loaded, however itself extension was loaded.
ID: 26240 Updated by: chregu@php.net Reported By: igor_udintsev at mail dot ru -Status: Open +Status: ... -
#26240 [NEW]: Functions of XSL-extension didn't loaded, however itself extension was loaded.
From: igor_udintsev at mail dot ru Operating system: Linux Red Hat 9 PHP version: 5.0.0b2 (beta2) PHP Bug Type: XSLT related... -
Is .dcr extension = Director file extension ?
I'm a newbie and saw some files on a website ending in .dcr... 1 - Is the .dcr file type a Macromedia Director file? 2 - Does it take the... -
danilocelic *TMM* #2
Re: Extension only works once
lfirth wrote:
As for inserting it the BODY, we'd have to see that code you're using to> Hi, I have been toying with creating my own extensions and have created a
> simple one that creates one line of VBScript code from a single variable. I
> have two problems. The first one is that it only will place the code in the
> "Body" of the web page. i.e. not between the <% %> ASP tags and two it only
> works once. If you try and use it a second time it doesn't work, yet if you
> wait for 10 minutes or so, it works again.
perform the insert.
Do you restart DW inbetween it working again? Anyway, please show your
code and we'll get it figured out.
--
Danilo Celic
| Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
| Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
danilocelic *TMM* Guest
-
lfirth #3
Re: Extension only works once
Here is the code
<script language="JavaScript">
function objectTag(form) {
var strformvar="";
var strMethod="";
var strType="";
var strBracketsLeft="";
var strBracketsRight="";
// Selects the value of the form method.
if (document.formvariables.method[0].checked == true){
strmethod = document.formvariables.method[0].value;
}
else {strmethod = document.formvariables.method[1].value;}
// Selects value of the variable type.
if (document.formvariables.StringType[0].checked == true){
strType = document.formvariables.StringType[0].value;
}
else if (document.formvariables.StringType[1].checked == true){
strType = document.formvariables.StringType[1].value;
}
else if (document.formvariables.StringType[2].checked == true){
strType = document.formvariables.StringType[2].value;
}
else {strType = document.formvariables.StringType[3].value;}
// This displays the form field contents.
if (document.formvariables.FormField.value != ""){
strformvar=document.formvariables.FormField.value;
}
else {strformvar='';}
if (document.formvariables[0].Brackets.checked) {
strBracketsLeft="<%";
strBracketsRight="%>";
}
return (strBracketsLeft + ' ' + strType + strformvar + ' = Request.' +
strmethod + '("' + strformvar + '") ' + strBracketsRight);
}
</script>
<form name="formvariables" method="post" action="">
<table width="394">
<tr>
<td width="137"><div align="left"><strong>Method</strong></div></td>
<td width="95"><strong>Varable Type </strong></td>
<td width="146"><strong>Form Field Name </strong></td>
</tr>
<tr>
<td width="137"><input name="method" type="radio" value="Form"
checked>Form</td>
<td><input name="StringType" type="radio" value="str" checked> String
</td>
<td rowspan="4"><input name="FormField" type="text"></td>
</tr>
<tr>
<td width="137"><input name="method" type="radio"
value="QueryString">QueryString</td>
<td><input name="StringType" type="radio" value="int"> Integer </td>
</tr>
<tr>
<td> </td>
<td><input name="StringType" type="radio" value="boo"> Boolean</td>
</tr>
<tr>
<td><input name="Brackets" type="checkbox"> Include '<% %>'</td>
<td><input name="StringType" type="radio" value="dat"> Date </td>
</tr>
</table>
</form>
lfirth Guest
-
danilocelic *TMM* #4
Re: Extension only works once
lfirth wrote:
Playing around a bit, and it seems that when you try to insert outside> Here is the code
of the body without adding in the <% %> delimiters, then it woudln't
insert, but other wise would. If within the body, it would insert with
and without <%%>, but if I tried above the opening <html> or above the
<head>, it wouldn't. I think this is how Objects are made, they "assume"
that anything that doesn't belong outside the body (that is "bare" text
whcih is what is inserted when you don't include the delimters) it tries
to place into the body.
A way around that woudl be to convert it into a Command and then use
dom.insertHTML to place the code into the page.
FWIW: If you want tte < to appear, then you need to use < instead.> <td><input name="Brackets" type="checkbox"> Include '<% %>'</td>
--
Danilo Celic
| Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
| Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
danilocelic *TMM* Guest
-
danilocelic *TMM* #5
Re: Extension only works once
danilocelic *TMM* wrote:
One way to do that would be to convert to what i call a Pass through> A way around that woudl be to convert it into a Command and then use
> dom.insertHTML to place the code into the page.
Object. You can read about it here:
[url]http://www.communitymx.com/abstract.cfm?cid=0E9AD[/url]
or by reading up on the runCommand API function.
HTH
--
Danilo Celic
| Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
| Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
danilocelic *TMM* Guest



Reply With Quote

