Dynamic create synonym script
we want to create few synonyms dynamicalyy, (ie) we will aceept the owner Name,DB link Names as parameter
(ex) I need to create dynamic statement
create synonym A.ATAB FOR B.ATAB@link1
while i execute the statement as
create synonym A.ATAB FOR &OWNER||".ATAB@"||&DBLINK
it gives an error saying that
SQL command not properly ended
what is wrong?
Did you try using dynamic or native dynamic sql?
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/11_dynam.htm#8074
Similar Messages
-
Script to create synonyms for the tables of Oracle Applications
Team,
For Oracle Applications 11i on W2K, where might I find a script to create synonyms for all of the application tables? I would think there would be a standard script somewhere in one of the directories created during the install or on the CDs.
Thanks,
LutherJohn, it is ssome sort of a bleed, but in this case it's not the part that 'might be cut off' that matters; it's the part that still needs to be on the page. Yes, I meant it to be (virtually) not-noticeable for the casual reader. Of course you can make it part of the page design, that ought to ease up matters.
The amount pages shift horizontally because of binding is called "creep", and this depends on the type of binding and the thickness of the paper. You cannot adjust for creep unless you know exactly how much this is and how your book is going to be printed and bound.
Airkite:
But the book that you printed worked out alright? Was it done with a different method?
This was a simple outlined text, not an image. Through the inaccuracies of printing and binding combined, there were no straight edges *anywhere* but fortunately the lines were thick enough to let you mentally connect them
This was done (I'm sure) with the method you proposed.
There is an alternative way, but it's way more expensive (on the other hand, the result is impressive): after the entire process of printing, binding, and cutting, books are put in a clamp one at a time and fed through a silk screen printer, fore edge on top, and printed with whatever you like.
I know of the existance of this technique but I haven't seen a book done like this in years and have no clue at all of the costs involved (writing that down in one sentence makes me realize those two might be connected). -
Create synonym everytime a new table/record is created
Hi
Is there a way of specifying within the peoplecode/Application designer to ensure that a synonym is created everytime a table/record object is created atleast for the Oracle database.
I am looking for a solution within the peoplecode/Application designer since currently we are hand-coding it from outside using shell scripts and sql*plus.
Thanks
Cyril
PS: sorry for the repeat post..the other was wrongSince I don't see what was wrong there, I'll repeat my answer from the other :
"You should create a trigger on schema level (most probably on SYSADM).
In that trigger (BEFORE CREATE), create a job (to be execute immediately, without recurrence), that job will call a procedure with the object name in input parameter. The procedure will grant and create synonym with in dynamic sql for that object."
That said, why do you want to manage it in Peoplesoft, tables are hosted by Oracle, when something is changed in AppDesigner, you should rebuild this object, the rebuild will affect the Oracle object, then the trigger can be fired.
Nicolas. -
Creating a script for inserting images
I am new to the scripting concept, so please forgive me when I use incorrect terminology.
I would like to create a script that will automatically place images in my InCopy document. Basically I want to type the names of image files in an InCopy document then run a script that will replace the name of the file with the actual image (either as an embedded image or as an image in a graphics frame, although the graphics frame might not work if the document isn't linked to an InDesign document.)
I'm assuming I'd have to identify the image name in some way (slashes or something before and after) and during the script I'd have to identify where to find the given images, such as which folder they are in.
Is this possible in InCopy?
Eventually, these InCopy documents will be used in InDesign. Would it be better/faster to use a script to import these images into InDesign instead of InCopy?
(In case the information is important, the images are all either .tif files or .eps files.)
Also, how do I find someone who can write this script for me? I'm assuming there are freelance programmer people out there... how do I find one?
Thanks for any advice/help you can give me!senza wrote:
this is ok, this i understand now. But where to tell which schema for which user?I don't understand this question. You create a synonym in your own schema for the object you want a synonym for...
so instead of referencing
select * from scott.empyou would create a synonym for scott.emp, so you can do
select * from emp -
Dynamically creating variable names in javascript
Hi.
I have to create variable names dynamically in JavaScript.
My JSP file accesses information from Database and forms a String corresponding to the information received.
This String is passed to a JAvaScript function that should CREATE a variable with that NAME.
For Ex:
My database access resulted in a single row...
id name sal
34 John Smith 38000
the resulting VARIABLE NAME should be Menu34. 34 comes from the database result.
Is there any function to dynamically create a variable name in JavaScript?
Thanks in advance.The JSP is printing the contents of an HTML page, and Javascript code can be part of that output...
So you would just write out the stuff, something like this....
<script>
<% while(rs.hasNext()) { %>
var Menu<%= rs.getInt("id") %> = '<%= rs.getString("name") %>';
<% } %>
</script>
In the browser, it'll just look like another long list of Javascript variables. -
Passing variables from a dynamically created textinput in AS2?
Hey everyone,
I have a contact form in my flash file with name/email/message fields which a user can fill out and then click send, which passes these to a php script which then emails the information that they entered. This works fine when the text inputs are manually placed on the stage and all the information is passed to the php script and emailed to me. I am just updating it so the textinputs are created via AS2 so that I can style them more easily etc. This is fine however when created via script they no longer get passed to my php file. I am creating the textinput using the following code (which works fine):
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = false;
my_fmt.font = "Arial";
my_fmt.color = inputcol;
contact_form.createTextField("contact_name", getNextHighestDepth(),112.6, 27, 174, 20);
contact_form.contact_name.wordWrap = true;
contact_form.contact_name.multiline = false;
contact_form.contact_name.border = true;
contact_form.contact_name.borderColor = inputcol;
contact_form.contact_name.type = "input";
contact_form.contact_name.setNewTextFormat(my_fmt);
contact_form.contact_name.text = "";
FYI I am creating this outside the movieclip containing the form (called contact_form) and then adding it into that mc specifically because I thought this may be necessary as doing it within the mc itself (using this.createTextField....) didn't work, however both seem to have the same effect.
I am then doing various checks on the input box contents (to make sure it's not empty etc), this also works fine and gives me the relevant error if it is empty so it's accessing it correctly. I then use the following code to submit the variables and check_status checks the success/failure of the php script and alerts the user accordingly:
loadVariables("http://www.makeaportfolio.com/send_email.php?flashmo=" + random(1000), this, "POST");
message_status.text = "sending....";
var interval_id = setInterval(check_status, 400);
This works fine however does not pick up the value of the dynamically created text input (however does pick up all the text inputs that are manually added to the stage). I am rather confused as to why it's not picking this up and am not sure how I set it to do so, i would be immensely grateful if someone could point me in the right direction?
Thanks so much for your help as ever,
DaveHi kglad,
I'm sorry but i still don't understand what you mean? They are all text inputs which are defined in AS2 (you can see the code in my first post), the values (inputtext.text) are surely set by the user when they enter information into the input boxes. Accessing these works fine within my flash file, they just don't get passed to my php file. I got round this by manually creating duplicate textinputs on the stage for each dynamically created textinput which are all hidden, then assigning the values of the dynamically created inputs to the manually created inputs before loading the php file. This works fine as it picks up the manually placed inputs as local. I assume it's something to do with the scope of the dynamically created inputs but I cannot work out how you would ensure they would be picked up as even when you explicitly create them within the relevant mc it doesn't pick them up. As I say i've managed to get it working in a rather convoluted way which is good but would be most interested to understand why the other method doesn't work.
Thanks so much for your help,
Dave -
Dynamically Create Repeater Element in ActionScript
Hi,
I'm trying to dynamically create a repeater control with an
image and a label control. I can do it directly in the MXML file
but when I try and covert it into ActionScript it's not working.
Can anyone see what the problem is with my code?
public function GetPalettes():void{
removeChild(document.FrontPage);
Palettes.method = "GET";
params = {"method": "GetPalettes", "BodyPartNo":
document.PalettesMenu.selectedItem.@partNo};
Palettes.cancel();
Palettes.send(params);
var VerticalBox:VBox = new VBox();
VerticalBox.x = 10;
VerticalBox.y = 10;
VerticalBox.id = "VerticalBox";
var PaletteRepeater:Repeater = new Repeater();
PaletteRepeater.dataProvider =
"{Palettes.lastResult.Palette}";
PaletteRepeater.startingIndex = 0;
PaletteRepeater.id = "PaletteRepeater";
var PaletteImage:Image = new Image();
PaletteImage.setStyle("HorizontalAlign", "left");
PaletteImage.source = "
http://localhost/Flex/Personalised%20Palettes-debug/{PaletteRepeater.currentItem.@PictureS rc}Med.png";
PaletteImage.useHandCursor = true;
PaletteImage.buttonMode = true;
PaletteImage.mouseChildren = false;
PaletteImage.id = "PaletteImage";
var PaletteDescription:Label = new Label();
PaletteDescription.text =
"{PaletteRepeater.currentItem.@Description}";
PaletteDescription.id = "PaletteDescription";
document.MainPage.addChild(VerticalBox);
VerticalBox.addChild(PaletteRepeater);
PaletteRepeater.addChild(PaletteImage);
PaletteRepeater.addChild(PaletteDescription);
Thanks"katychapman85" <[email protected]> wrote in
message
news:[email protected]...
> Hey Amy,
>
> I've put a thread up about this but thought I'd ask you
as well as you've
> been
> a great help to me so far.
>
> I have this function:
> public function GetOptions(Menu:int):void{
> document.MenuOptions.url =
> "
http://localhost/Flex/Personalised%20Palettes-debug/MenuOptions.php?Menu=";
> document.MenuOptions.url += Menu;
> document.MenuOptions.send();
> }
>
> What I'm trying to do is when a user clicks on a Radio
button this
> function is
> called and the number of the Menu required is sent to
the function.
>
> I've added this Event Listener to my Radio Button:
>
>
document.RadioButtons2.addEventListener(MouseEvent.CLICK,
> function():void{GetOptions(2);});
>
> However, it's not working. Everything I've read suggests
using an
> anonymous
> function in the Event Listener to pass the menu
parameter but for some
> reason
> it's not working.
What version of Flex are you using? The Help for Flex 3 has
this to say:
http://www.adobe.com/livedocs/flex/3/html/help.html?content=events_05.html
Defining event listeners inline
The simplest method of defining event handlers in Flex
applications is to
point to a handler function in the component's MXML tag. To
do this, you add
any of the component's events as a tag attribute followed by
an ActionScript
statement or function call.
You add an event handler inline using the following syntax:
<mx:tag_name event_name="handler_function"/>
For example, to listen for a Button control's click event,
you add a
statement in the <mx:Button> tag's click attribute. If
you add a function,
you define that function in an ActionScript block. The
following example
defines the submitForm() function as the handler for the
Button control's
click event:
<mx:Script><![CDATA[
function submitForm():void {
// Do something.
]]></mx:Script>
<mx:Button label="Submit" click="submitForm();"/>
Event handlers can include any valid ActionScript code,
including code that
calls global functions or sets a component property to the
return value. The
following example calls the trace() global function:
<mx:Button label="Get Ver" click="trace('The button was
clicked');"/>
There is one special parameter that you can pass in an inline
event handler
definition: the event parameter. If you add the event keyword
as a
parameter, Flex passes the Event object and inside the
handler function, you
can then access all the properties of the Event object.
The following example passes the Event object to the
submitForm() handler
function and specifies it as type MouseEvent:
<?xml version="1.0"?>
<!-- events/MouseEventHandler.mxml -->
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
import mx.controls.Alert;
private function myEventHandler(event:MouseEvent):void {
// Do something with the MouseEvent object.
Alert.show("An event of type '" + event.type + "'
occurred.");
]]></mx:Script>
<mx:Button id="b1" label="Click Me"
click="myEventHandler(event)"/>
</mx:Application>
It is best practice to include the event keyword when you
define all inline
event listeners and to specify the most stringent Event
object type in the
resulting listener function (for example, specify MouseEvent
instead of
Event).
You can use the Event object to access a reference to the
target object (the
object that dispatched the event), the type of event (for
example, click),
or other relevant properties, such as the row number and
value in a
list-based control. You can also use the Event object to
access methods and
properties of the target component, or the component that
dispatched the
event.
Although you will most often pass the entire Event object to
an event
listener, you can just pass individual properties, as the
following example
shows:
<?xml version="1.0"?>
<!-- events/PropertyHandler.mxml -->
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
import mx.controls.Alert;
private function myEventHandler(s:String):void {
Alert.show("Current Target: " + s);
]]></mx:Script>
<mx:Button id="b1" label="Click Me"
click="myEventHandler(event.currentTarget.id)"/>
</mx:Application>
Registering an event listener inline provides less
flexibility than using
the addEventListener() method to register event listeners.
The drawbacks are
that you cannot set the useCapture or priority properties on
the Event
object and that you cannot remove the listener once you add
it.
don't see anything in there about anonymous functions...? -
Hi,
I have a script which currently prints a number of item details.
Users want to change the layout so that the result is given in tabular format,i.e, the item details need to be displayed in rows and column format. As the number of items can vary, could you please help me with the logic of displaying this using script?
Thanks in advance,
NeethuHi,
Creating dynamic boxes in script is possible but formatting and getting proper allignment is very tedious job. I had similar requirement for creating dynamic boxes in SAP Script, but getting right allignment of those boxes was not possible and hence I switched to smartform. So I would advise you the same to use smartform for such type of requirement. In smartforms it becomes very easy.
Still try the following syntax:
/:POSITION XORIGIN '5' CM YORIGIN '5'CM
/:SIZE HEIGHT '0' CM WIDTH '0' CM
/:BOX FRAME 10 TW INTENSITY 10
Hope this helps.
Reragds,
Abhijeet -
Dynamically created COLLAPSIBLE PANELS
In case this might help others, I thought I would share how I
dynamically create Collapsible Panels using MySQL, PHP, and SPRY.
Please note that I am not a master PHP coder and so there might be
a more efficient method but this does work great for me. Here is my
scenario. I have a MySQL table which holds a list of user
applications. Some applications then have individual modules which
are stored in a seperate table and related to applications by
app_id. I want to display the list of applications and then for
applications that have modules I create a collapsible panel to
display the modules.
My Applications:
mysql_select_db($database_ppg_conn, $ppg_conn);
$query_applications = "SELECT * FROM applications ORDER BY
active desc, name ASC";
$applications = mysql_query($query_applications, $ppg_conn)
or die(mysql_error());
$row_applications = mysql_fetch_assoc($applications);
$totalRows_applications = mysql_num_rows($applications);
code for application lists and collapsible panels:
<div id="maincontainerbox" align="center">
<div class="ppgaccounthdr">
PPG Applications
</div>
<div class="ppgaccountrow_active">
<a href="ppgaccounts_update.php?app=new">Add New
Application</a>
</div>
<?php
$icount = 0;
do { ?>
<?php switch ($row_applications['modules']) {
case "Y":
$modules = 1; //flags the building of collapsible panel to
display available modules for current application.
++$icount; //tracks # of applications that have modules.
This is used to properly create multiple collapsible panels.
break;
default:
$modules = 0; //no modules for current app
break;
} ?>
<?php switch ($row_applications['active']) {
case "Y":
if ($modules == 1) {
echo '<div id="CollapsiblePanel'.$icount.'"
class="ppgaccountrow_active1"><div
class="ppgaccountrow_active">';
} else {
echo '<div class="ppgaccountrow_active">'; }
break;
default:
echo '<div class="ppgaccountrow_notactive">';
break;
?>
<a href="ppgaccounts_update.php?app=<?php echo
$row_applications['id'];?>"><?php echo
$row_applications['name']; ?></a>
<?php if ($modules == 1) {
echo '</div>';
echo '<div class="CollapsiblePanelContent">';
$query_appmodules = "SELECT *
FROM app_modules
WHERE app_id = {$row_applications['id']}
ORDER BY active desc, name ASC";
$appmodules = mysql_query($query_appmodules, $ppg_conn) or
die(mysql_error());
$row_appmodules = mysql_fetch_assoc($appmodules);
$totalRows_appmodules = mysql_num_rows($appmodules);
echo '<div class="appmodulerow_active">';
echo '<a
href="ppg_app_modules_update.php?id=new&app_id='.$row_applications['id'].'">Add
New Module</a>';
echo '</div>';
do {
switch ($row_appmodules['active']) {
case "Y":
echo '<div class="appmodulerow_active">';
break;
default:
echo '<div class="appmodulerow_notactive">';
break;
echo '<a
href="ppg_app_modules_update.php?id='.$row_appmodules['id'].'"
title="Update Application
Module">'.$row_appmodules['name'].'</a></div>';
} while ($row_appmodules = mysql_fetch_assoc($appmodules));
mysql_free_result($appmodules);
echo '</div>';//close content div for collapsible
panal
} ?>
</div>
<?php } while ($row_applications =
mysql_fetch_assoc($applications)); ?>
</div>
So when my application record has a flag saying that it
possesses modules I increment $icount and then use
echo '<div id="CollapsiblePanel'.$icount.'"
class="ppgaccountrow_active1"> to build the collapsible
panel. Notice the $icount in the div id. Now at the bottom of the
HTML I do the following.
<?php
$i = 0;
do {
++$i;
echo 'var CollapsiblePanel'.$i.' = new
Spry.Widget.CollapsiblePanel("CollapsiblePanel'.$i.'",{contentIsOpen:false});';
} while ($i <= $icount);
?>
//-->
</script>
This creates a collapsiblepanel for each application which
has modules.
I hope I have described this ok and that it might help
somebody out. If you have suggestions on how to do it better then
please do let me know.
Thanks,
Lee GoolsbyNice. Thanks for posting this, Lee.
-
Want to run synonym script where schema should be passed parameter as once
HI,
I Want to run creation of synonym script where schema should be entered only once.
My synonym script is as follows.I Should enter user or schema only once for all the synonyms.
CREATE SYNONYM EMP FOR & user .EMP ;
CREATE SYNONYM DEPT FOR & user .DEPT ;
CREATE SYNONYM EMPDEPT FOR & user .EMPDEPT ;
and so on
pls anyone help ne out
thankssrinivas wrote:
HI,
I Want to run creation of synonym script where schema should be entered only once.
My synonym script is as follows.I Should enter user or schema only once for all the synonyms.
CREATE SYNONYM EMP FOR & user .EMP ;
CREATE SYNONYM DEPT FOR & user .DEPT ;
CREATE SYNONYM EMPDEPT FOR & user .EMPDEPT ;
and so on
pls anyone help ne out
thanksRun the result of the following query
SELECT 'create synonym '
|| table_name
|| ' for '
|| owner
|| '.'
|| table_name
|| ';'
FROM all_tablesKamran Agayev A.
Oracle ACE
My Oracle Video Tutorials - http://kamranagayev.wordpress.com/oracle-video-tutorials/ -
Dynamic tablespace creation script in database
Hi,
I am looking for a script which can generate create tablespace statements dynamically from the existing database so that I can run these create tablespace statements on to the new databases.
My first try is like this
SQL> select ' create tablespace ' || tablespace_name a || ' datafile ' || ' size
s)|| ' from ' || dba_free_space where tablespace_name = a ||' extent managemen
|| select initial_extent from dba_tablespaces where tablespace_name = || ' segment space management auto ;' from dba_tablespaces;
This sql should resemble the following template.
Create tablespace D0001 datafile
'/ldata/<SITE CODE>/<FILE DB NAME>/oradata/<SID NAME>/<SID NAME>_d0034a.dbf' size 640M extent management local uniform size 64K segment space management auto;
I will add datafile location later in the create tablespace script.
I want to thank you in advance for any help on this.
Regards,
prabhathHi Paul,
Thanks for your reply. but the statement you have given doesnt give the full output of create tablespace statement.
The output is something like this
SQL> select dbms_metadata.get_ddl('TABLESPACE',tablespace_name) from dba_tablespaces;
CREATE TABLESPACE "SYSTEM" DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL
CREATE UNDO TABLESPACE "UNDOTBS1" DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADA
CREATE TABLESPACE "SYSAUX" DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL
CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE
'D:\ORACLE\PRODUCT\10.1.0\ORAD
CREATE TABLESPACE "USERS" DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL8
CREATE TABLESPACE "EXAMPLE" DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORC
6 rows selected.
Regards,
prabhath -
Creating a Function logic for dynamically created XML buttons
Hi!
It's me...... again! Now I've dynamically created some buttons using XML. They're spread around the stage and I've modified a tooltip script to give each button a tooltip on Mouse_Over. But to se the logic and make it work using AS3 is hard (for me). I want a function that accept to parameters: Tooltip text and Object to tooltip.
In my code I get this error msg when initiating the function on dynamically created buttons:
1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
I beleive there are more than one thing here needing a fix.
Can someone have a look and give me a pointer?
Thanks
function contentTooltip(ttt:String, ttclip:MovieClip):void {
ttclip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
function mouseOverHandler(e:MouseEvent):void {
ttip.descr.text=ttt;
ttip.x=stage.mouseX;
ttip.y=stage.mouseY-15;
ttclip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
ttclip.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
ttip.visible = true;
function mouseOutHandler(e:MouseEvent):void {
ttip.visible = false;
ttclip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
ttclip.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
function mouseMoveHandler(e:MouseEvent):void {
ttip.x=stage.mouseX;
ttip.y=stage.mouseY-15;
contentTooltip("Scale button",scale_btn);
contentTooltip("Hide button",hide_btn);I totally agree with what Ned says and suggests. Nevertheless, I would like to support your thinking process.
From the way you wrote the tooltip functionality it is apparent to me that you conceptualize as a programmer. Again, as Ned said, nested functions are evil. BUT, in a way, what classes accomplish is encapsulation/nesting of properties and functions under the same umbrella. It actually feels that what timeline does in general is nesting named functions within a single function we have no access to.
How you wrote the code is actually a blueprint for a class that could handle the functionality. You, perhaps, are very ready to start coding with classes - not on the timeline.
With that said, for the sake of theory, here is how your functionality can be rewritten on timeline:
scale_btn.toolTip = "Scale button";
test_btn.toolTip = "Test button";
hide_btn.toolTip = "Hide button";
scale_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
test_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
hide_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
var overTarget:MovieClip;
function mouseOverHandler(e:MouseEvent):void {
overTarget = e.currentTarget;
ttip.descr.text = overTarget.toolTip;
ttip.x = stage.mouseX;
ttip.y = stage.mouseY - 15;
overTarget.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
overTarget.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
setChildIndex(ttip, numChildren - 1);
ttip.visible = true;
function mouseOutHandler(e:MouseEvent):void {
ttip.visible = false;
overTarget.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
overTarget.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
function mouseMoveHandler(e:MouseEvent):void {
TweenMax.to(ttip, .5, { x:stage.mouseX, ease:Quart.easeOut } );
TweenMax.to(ttip, .5, { y:stage.mouseY - ttclip.height / 2, ease:Quart.easeOut } );
//ttip.x=stage.mouseX;
//ttip.y=stage.mouseY-ttclip.height/2; -
How do I dynamically create a pdk:text / field?!!!!!!
I have a form that is to let the user add multiple rows and I need to be able to dynamically create a text filed and assign the attributes maxlength, size, name,property, and also assign the onkeypress a java script function. the following code will get me a text box but none of the attributes work:
function add_Row(TLBID)
var tbody = document.getElementById(TLBID).getElementsByTagName("TBODY")[0];
var row = document.createElement("TR");
var tlbTD = document.createElement("TD");
var txtelement = document.createElement("TEXTAREA");
tlbTD.colSpan = 2;
txtelement.cols="25";
txtelement.rows="2";
txtelement.name="newDCTResponseText";
tlbTD.appendChild(txtelement);
var tlbTD2 = document.createElement("TD");
tlbTD2.valign="bottom";
var txtelement2 = document.createElement("input");
txtelement2.type="text";
txtelement2.maxlength="5";
txtelement2.size="2";
txtelement2.name="dctqeBean";
txtelement2.property="dctScoreTxtBox";
txtelement2.onkeypress="do_validate()";
tlbTD2.appendChild(txtelement2);
row.appendChild(tlbTD);
row.appendChild(tlbTD2);
tbody.appendChild(row);
}Hi Ray,
Thanks for your response. I do not understand the explanation. Maybe it is because I did not explain what I need or maybe becasue I am new to TS. Here's what I'd like to do.
Have a predefined list of IO names. Like:
Nest1
K23 "DIO96/port0/line1"
K24 "DIO96/port0/line2"
Nest2
K23 "DIO96/port1/line1"
K24 "DIO96/port1/line2"
I will have 2 nests(sockets) in my system running batch model. From what I understand I can have 1 sequence defined and TS that will execute 2 threads with 1 socket per thread. In this sequence I somehow need to pass to my VI the value of K23 which is different for socket1 and 2. I was thinking that I can somehow create the Property Name Dynamically. Sort of like that:
RunState.Sequence.Parameters.GetPropertyObject("Nest%d",RunState.TestSockets.MyIndex+1).K23
It would give the sequence running for socket 1 the value "DIO96/port0/line1" and "DIO96/port1/line1" for socket 2
thanks
J. -
Hi
I did not find any way of accessing a dynamically created
object by using notation this[id].
As the code below shows, only hard coded id objects are
recognised by this[id] notation.
Any way to do it ?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.*;
public var l:Label;
public function init():void {
l = new Label();
l.id = 'label1';
l.text = 'firstname';
addChild(l);
public function fred(event:Event):void {
mytextarea1.text+=this['mytextarea1'].name + '\n';
mytextarea1.text+=this['label1'].name + '\n';
]]>
</mx:Script>
<mx:TextArea id="mytextarea1" width="1300"
height="200"/>
<mx:Button click="fred(event)" />
</mx:Application>Thanks guys but I think my example is too simple compared to
my "real world" current problem ...
In my project, I dynamically create containers and children.
I'd like to reach directly a then dynamically created child by its
id, but notation this[id] is not recognised.
A better example : form f1 (id='form1) contains 2 labels (ids
'form1label1' and 'form1label2') ; f1 is included in form f0.
Calling this['form1label1'] crashed even though it is a
declared id control ! The same example using <mx> tags would
not crash...
And I have gone aroud 10000 articles but never found an
answer to this.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.*;
import mx.containers.*;
public function init():void {
var f0:VBox = new VBox();
var f1:VBox = new VBox();
var l:Label;
f0.id = 'form0';
f1.id = 'form1';
l= new Label();
l.id = 'form1label1';
l.text = 'mobile';
f1.addChild(l);
l = new Label();
l.id = 'form1label2';
l.text = 'work';
f1.addChild(l);
f0.addChild(f1);
addChild(f0);
public function fred(event:Event):void {
mytextarea1.text+=Label( this['form1label1'] ).text + '\n';
]]>
</mx:Script>
<mx:TextArea id="mytextarea1" width="1300"
height="200"/>
<mx:Button click="fred(event)" />
</mx:Application> -
This[id] doesn't see dynamically created objects????
Hey all!
If i have
<mx:Canvas id="TopCanvas" initialize="Init()">
<mx:Canvas id="VisibleCanvas" >
</mx:Canvas>
</mx:Canvas>
<fx:Script>
function Init(){
var NewO = new Canvas();
NewO.id="InvisibleCanvas";
TopCanvas.addChild(NewO);
if (this["VisibleCanvas"]){
//We can see non-dynamically created canvas
if (this["InvisibleCanvas"]){
//ERROR we cannot see the new one!
Help please! How to access dynamically created Canvases via their id? I know i can save linkage to them in array, but i need to do it through id.
Cheers!If you set the id property on a dynamically created instance, you can check
the id of an instance later if it happens to be a target of an event, for
example. But it will not be assigned to a variable in the document.
By default, MXML generates a non-dynamic class so you can't add properties
to it at runtime. You can set the name property and search the immediate
parent by calling getChildByName, but if the parent is not the document, you
still can't search the document.
Maybe you are looking for
-
Display Total in Group Above Report
Hello, I have a group above report with month, product_id, product_name as group above fields I have product_entry_date, description, total_qty, actual_qty etc as display fields in my report. I would like to have a total and grand total for total_qty
-
Compress infocube with zero elimination
Experts, Is that true you should always check "with zero elimination" when you compress infocubes? I was reading the famous SAP doc "How to Handle Inventory Management Scenarios in BW", the screen shots for cube compression does not have that checkb
-
How do I view other's tweets after updating to iOS 5?
HELP! I just downloaded the new iOS 5 with integrated Twitter but I don't know how to veiw other's tweets that I am following! Please help!
-
Calculation Based on Previous Day's Figure
Hi all, This is a solution I implemented several years ago, which is now causing problems and must be rectified. The intention was to compare a single field across two days and calculate the difference. The only way I could figure out how to do tha
-
Backing Up My Complete Library.
I know how to backup my songs onto cds but I want to backup my tv shows and movies too. How do I do that?? Or can I do that?