Change nav button state when using SSI
I am going to be redesigning a website soon and I am going to use SSI's. Is there a way to change the state of the nav button in relation to the page that is being viewed if the nav bar is in the SSI? If not, what is the best way to achieve this?
I was thinking that the pages specific to the nav buttons (Home, Contact, etc) can not have the nav bar in the SSI and it must be in the main file. If the design is changed in the future the pages containing specific nav button states must be changed individually.
Thanks for any input.
<script src="SpryAssets/SpryDOMUtils.js" type="text/javascript"></script>
This links to the file that is required for the Spry Element Selector
function InitPage(){
Spry.$$('#MenuBar1 li').forEach(function(node){
var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
if(a.href == window.location){
Spry.Utils.addClassName(node,"activeMenuItem");
This function checks the list items (li) within div ID MenuBar1 and retrieves the the link within the anchor (a) element. If the link (a.href) is the same as the URL (window.location) then add a class called activeMenuItem to the list item.
Spry.Utils.addLoadListener(InitPage);
When the page loads, this will trigger the function
.activeMenuItem a {
background:#a59a84 !important;
color:#ffffff !important;
We need to add style rules for the anchor element within the list item with the class of activeMenuItem.
Gramps
Similar Messages
-
Cursor does not change to a circle when using eraser
Cursor does not change to a circle when using the eraser.
I'm sure it must be a tick box somewhere.
Its always been ok previously.I had this same problem and was searching for answers. I also prefer using a circle instead of crosshairs. I hope you've figured it out by now, but, if you haven't, here is the answer (I am using Elements 9, but, it should work for other versions I think):
1. Open up Elements Editor, Click on Edit, Click on Preferences, Click on Display & Cursors.
2. Under Painting Cursors, select Full Size Brush Tip
3. (optional) - if you want crosshairs within your circle, then also select Show Crosshair in Brush Tip.
4. Click ok.
Now use the brush, and it should have a circle to use.
P.S. Sometimes if you have your Caps Lock key on, that removes the circle as well. -
Making a button programmatically not change its 'physical' state when pressed
I have this button:
which changes into this when pressed:
How do i programmatically make the button not change into its 2nd state when pressed? do i use property nodes? if so, how?
thanksIf you use the Colors Property Node, you can change the colors dynamically, so you can set it all green when you need it, then change it back to green and red.
The only way you can intercept the button press is to use the Mouse Down? event in the event structure. You will need to verify a left mouse click and then Discard the event. That will be your inidcation the button has been pressed. However, you will still need to track your state to not discard the event in the situations where you want the button to actuate.
It is much easier to dynamically change the colors. -
Confused by the change in logical IO when using a UNION
Hi,
we were discussing tuning strategies (using SQL*Plus and autotrace) and stumbled over a strange behaviour.
When I do a straight select I get the following output:
SQL> select * from orders where id > 600000;
100000 rows selected.
Execution Plan
Plan hash value: 1275100350
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 99585 | 2236K| 436 (14)| 00:00:07 |
|* 1 | TABLE ACCESS FULL| ORDERS | 99585 | 2236K| 436 (14)| 00:00:07 |
Predicate Information (identified by operation id):
1 - filter("ID">600000)
Statistics
0 recursive calls
0 db block gets
9473 consistent gets
0 physical reads
0 redo size
3353061 bytes sent via SQL*Net to client
73711 bytes received via SQL*Net from client
6668 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
100000 rows processed
SQL>which is more or less what I expected. Now the strange thing comes when I change the statement to
select * from orders where id > 600000 and id < 630000
union
select * from orders where id >= 630000;which selects the same set of data. Of course the execution plan changes for this query, but what really puzzles me is the huge different for logical IO (consistent gets)
SQL> select * from orders where id > 600000 and id < 630000 union select * from orders where id >= 630000;
100000 rows selected.
Execution Plan
Plan hash value: 2377290594
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 99587 | 2236K| | 1242 (71)| 00:00:19 |
| 1 | SORT UNIQUE | | 99587 | 2236K| 7088K| 1242 (71)| 00:00:19 |
| 2 | UNION-ALL | | | | | | |
| 3 | TABLE ACCESS BY INDEX ROWID| ORDERS | 29914 | 671K| | 184 (3)| 00:00:03 |
|* 4 | INDEX RANGE SCAN | PK_ORDERS | 29914 | | | 61 (4)| 00:00:01 |
| 5 | TABLE ACCESS BY INDEX ROWID| ORDERS | 69673 | 1564K| | 424 (3)| 00:00:07 |
|* 6 | INDEX RANGE SCAN | PK_ORDERS | 69673 | | | 139 (4)| 00:00:03 |
Predicate Information (identified by operation id):
4 - access("ID">600000 AND "ID"<630000)
6 - access("ID">=630000)
Statistics
0 recursive calls
0 db block gets
594 consistent gets
0 physical reads
0 redo size
3353061 bytes sent via SQL*Net to client
73711 bytes received via SQL*Net from client
6668 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
100000 rows processed
SQL>Even though the same number of rows is selected, and the same number of bytes are sent to the client, why is the number of logical IOs so much lower?
When I change the UNION to a UNION ALL the consistent gets go way up (13893) which I don't understand as well (the execution plan is basically the same, just missing the SORT UNIQUE node)
Can anyone shed some light on this? Especially why the UNION needs substantially less IO
I would have expected it to use more IO due to the duplicate index range scan. More like the figures I get when using UNION ALL
This is on a developer machine. Windows XP, Oracle 10.2.0.1.0
Thanks in advance
ThomasThanks for the answer.
Yes, the statistics are up-to-date.
Yes I have noticed the full table scan, but when I change the condition for the first select in order to reduce the number of rows so that an index range scan makes sense, the figures are more or less the same:
SQL> select * from orders where id > 630000;
70000 rows selected.
Execution Plan
Plan hash value: 1270478249
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 69672 | 1564K| 424 (3)| 00:00:07 |
| 1 | TABLE ACCESS BY INDEX ROWID| ORDERS | 69672 | 1564K| 424 (3)| 00:00:07 |
|* 2 | INDEX RANGE SCAN | PK_ORDERS | 69672 | | 139 (4)| 00:00:03 |
Predicate Information (identified by operation id):
2 - access("ID">630000)
Statistics
0 recursive calls
0 db block gets
9724 consistent gets
0 physical reads
0 redo size
2627301 bytes sent via SQL*Net to client
51711 bytes received via SQL*Net from client
4668 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
70000 rows processedWhen I change the condition for the union to only retrieve 70000 rows as well, I get figures comparable to my very first example:
SQL> select * from orders where id > 630000 and id < 650000 union select * from orders where id >= 650000;
70000 rows selected.
Execution Plan
Plan hash value: 2377290594
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 69673 | 1564K| | 871 (73)| 00:00:13 |
| 1 | SORT UNIQUE | | 69673 | 1564K| 4977K| 871 (73)| 00:00:13 |
| 2 | UNION-ALL | | | | | | |
| 3 | TABLE ACCESS BY INDEX ROWID| ORDERS | 19943 | 447K| | 123 (3)| 00:00:02 |
|* 4 | INDEX RANGE SCAN | PK_ORDERS | 19943 | | | 42 (5)| 00:00:01 |
| 5 | TABLE ACCESS BY INDEX ROWID| ORDERS | 49730 | 1116K| | 303 (3)| 00:00:05 |
|* 6 | INDEX RANGE SCAN | PK_ORDERS | 49730 | | | 100 (4)| 00:00:02 |
Predicate Information (identified by operation id):
4 - access("ID">630000 AND "ID"<650000)
6 - access("ID">=650000)
Statistics
1 recursive calls
0 db block gets
418 consistent gets
0 physical reads
0 redo size
2347358 bytes sent via SQL*Net to client
51711 bytes received via SQL*Net from client
4668 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
70000 rows processed -
Not using MSDTC in SQL Cluster when using SSIS
I have an SSIS package that reads data from Oracle and inserts it into SQL Server.
The SQL Server is clustered (node1, node2) but it doesn't have MSDTC. The package runs fine without problems.
I have read that if you are using SSIS package then MSDTC is a must when configuring SQL Server cluster. But I am not using it and still package is working fine so I wanted to ask what's the use of MSDTC? How is my package working without it?Please refer below link and determine if you need it. If you are using distributed transaction in SSIS package you will require it.
Do i need to configure MSDTC
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
My TechNet Wiki Articles -
Have "OK" button selected when using JOptionPane.showMessageDialog
When using the following instruction, I would like that user only hit enter instead of pointing the cursor on the "OK" button and then click.
JOptionPane.showMessageDialog( null, jta_output , "Solution",
JOptionPane.INFORMATION_MESSAGE );
Is there a way to "preselect" the "OK" button so that user can only hit the enter key?
ThanksThanks for your answer.
Nevertheless I don't see how to implement this method.
1. How can I link the "OK" button, resulting from the run of "JOptionPane.showMessageDialog( null, jta_output , "Solution", JOptionPane.INFORMATION_MESSAGE );" instruction, and the method "setInitialSelectionValue"?
2. What object and value must be specified to refer to the "OK" button, when using method "setInitialSelectionValue"?
Regards -
How to change gtk theme dialog box button appearance when using tab?
Hi,
I'm using candido as my gtk theme and have noticed that when a dialog box pops up (Yes / No), it is extremely difficult to tell which option is highlighted. How do I change this appearance? I searched through the gtkrc and even used gimp to manipulate the images used via trial and error to see if I found one that worked. Can someone familiar with gtk themes tell me which gtkrc or image to alter to affect this appearance?
I use tab to select my option a ton and hate not being able to tell what I'm looking at.
For reference,
- here is the current look (can you tell which one is highlighted? It's "Cancel" -- just slightly bigger or a fine line around it) LINK
- here is the gtkrc if that helps? LINK
For one more point of clarification, I'm not talking about the button appearance on mouseover. I have identified that the button-prelight.png file changes that. I specifically am talking purely about a dialog popping up and then using the tab key alone to highlight through the options. I really like this theme, but this one thing drives me crazy. This appearance changes when I select different themes with lxappearance, so I've narrowed it down to being a gtk-theme issue, not my openbox theme or icon set.
Many thanks!
Last edited by jwhendy (2011-02-02 18:11:10)HI,
Debug the program after you press the CANCEL button , you will get where the conrol is flowing , And instead of using
Leave to screen '910' use Leave to screen 0.
Regards,
Madhukar Shetty -
How to change the search provider when using the Firefox Home Button Search feature?
In Firefox itself I have configured duckduckgo as my default search provider.
But when I use the Firefox Home Button Search it is always set to google and I do not see any option to change that?
I like the Firefox Home Button Search (or whatever it's called) otherwise, but it's annoying that it does not use the default from Firefox.
I use the Google Now Launcher.''philipp [[#answer-704494|said]]''
<blockquote>
...usually it will be enough to switch the default engine in firefox back and forth once to work around the issue...
</blockquote>
Thank you, problem resolved -
Radio Button problem when using Logical Databases.
Hi,
I have a report that uses logical database PCH. I'd like to default the reporting period radio button so that when the report is run it is defaulted to today.
The name of the screenfield is PCHZTR_D so I set
PCHZTR_D = 'X'.
in the initialisation event but this doesn't work.
Any suggestions how I can get the reporting period to default to 'today' programmatically.
I don't want to use a variant.
Thanks,
PaulTry doing it in the AT SELECTION-SCREEN output Event.
report zrich_0001.
nodes: objec.
<b>at selection-screen output.
PCHZTR_A = space.
PCHZTR_D = 'X'.</b>
REgards,
Rich HEilman -
Specific changes are left undetected when using proxy indirection
Hello!
Recently, the following issue have been identified:
ObjectReferenceMapping together with ProxyIndirectionPolicy and *UnitOfWorkValueHolder fails to identify specific changes - setting a reference to 'null' when the attribute's value was not instantiated previously.
Detailed description:
Consider we have 2 objects: A and B, and A has OneToOneMapping to B and uses ProxyIndirection.
In initial moment we have A1 that references B1 in DB.
Then we register A1 for modification. What we have in memory in UnitOfWork? Something like the following:
A1(Clone) with attribute for B reference uninstantiated;
A1(Backup) with <null> reference for B, as the attribute is expected to be retrieved when we access B from A1(Clone).
Then we set reference in A1(Clone) for B to <null>.
This change then will not be identified during commit phase, because of the result of getAttributeValueFromObject both for B reference in A1(Clone) and A1(Backup) is <null>. This part is clearly visible from the ObjectReferenceMapping.compareForChange method code:
if ( !owner.isNew() ) {
backUpAttribute = getAttributeValueFromObject(backUp);
if ( (backUpAttribute == null) && (cloneAttribute == null) ) {
return null;
Accessing the B field in A1(Clone) fixes the problem, because in this case backUpAttribute value is initialized through *UnitOfWorkValueHolder.
So it seems the part should be reworked to handle such cases, it seems reasonable that fields in backup clones that are using proxy indirection should be initialized even if not accessed to contain all required information to allow correct comparision in such cases.
Can somebody from TopLink team comment this?
Thanks,
SergeyThis does appear to be an issue. I will log this problem internally, you may want to follow it up with support.
A work around is to instantiate the proxy in your set methods.
i.e.
public void setAddress(Address newAddress) {
if (this.address != null) {
this.address.hashCode();
this.address = newAddress;
} -
Change the form size when using 9ias v 1.0.22 - Forms 6i to web
I have a form created in Forms 6i. When I run this on web the viewable size is only 1/4 of avaible screen space and I need to use the scroll bars to see the entire form.
Currently using 9iAS v 1.0.22
Are there settings that I can set to change this?
nullchange the width and height parameters for the applet in the html that invokes the form or in the formsweb.cfg file on the server.
-
Invalid SQL Statement when using execute for running Procedures
Hi ,
I create a simple stored procedure , it was created successfully , when i tried to run the StoredProcedure , it is giving me
exec myStoredProcedure() ;
please tell me why this is coming .hi
i am using oracle 10g with asp.net
i have created a procedure and it executed successfully, when i executed with exce <storedproc>
but when i call up this procedure with .net it is giving an error like this..
ERROR [42000] [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement
any one pls suggest me how to resolve this issue
here is my stored procedure
create or replace
procedure sp_AddTrial (parStudyName VARCHAR2, parContactName VARCHAR2, parContactNumber varchar2, parDescription varchar2, parFactorName in varchar2, parTreatmentName in varchar2) is
Pos int;
Pos1 int;
parName varchar2(50);
parTName varchar(30);
parFactorNames varchar2(500);
parTreatments varchar2(500);
parWeight int;
parValue varchar2(20);
parValue1 varchar2(20);
parValue2 varchar2(20);
parValue3 varchar2(20);
begin
parFactorNames :=parFactorName;
parTreatments :=partreatmentname;
insert into mivrs_studyinfo(
study_id,
study_name,
contact_name,
phone_number,
description,
created_date,
modified_date
values
mivrs_studyinfo_seq.NEXTVAL,
parStudyName,
parContactName,
parContactNumber,
parDescription,
sysdate,
sysdate
if parTreatments is not null then
parTreatments := Concat(TRIM(parTreatments),',');
Pos1 := INSTR(parTreatments,',');
insert into temp values(1,'test');
IF length(parTreatments)!= 0 then
WHILE Pos1 > 0
loop
insert into temp values(2,Pos1);
parTName := TRIM(SUBSTR(parTreatments,0, Pos1 - 1));
parTreatments := SUBSTR(parTreatments,Pos1 + 1);
Pos1 := INSTR(parTreatments,',', 1);
parWeight := TRIM(SUBSTR(parTreatments,0, Pos1 - 1));
IF length(parTName) != 0 then
insert into mivrs_treatments (treatment_id, treatment_name, weight, study_id, created_date, modified_date) values (mivrs_treatments_seq.NEXTVAL, parTName, parWeight, mivrs_studyinfo_seq.CURRVAL,sysdate, sysdate);
end if;
parTreatments := SUBSTR(parTreatments, Pos1+1);
Pos1 := INSTR(parTreatments,',');
END loop;
END IF;
end if;
if parFactorNames is not null then
parFactorNames := Concat(TRIM(parFactorNames),',');
Pos := INSTR(parFactorNames,',');
IF length(parFactorNames)!= 0 then
WHILE Pos > 0
loop
parName := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue1 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue2 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue3 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
IF length(parName) != 0 then
insert into mivrs_stratificationfactors (factor_id, factor_name, study_id, value1,value2,value3,value4) values (mivrs_stratfactors_seq.NEXTVAL, parName, mivrs_studyinfo_seq.CURRVAL,parValue,parValue1,parValue2,parValue3);
end if;
parFactorNames := SUBSTR(parFactorNames, Pos+1);
Pos := INSTR(parFactorNames,',');
END loop;
END IF;
end if;
end;
thank u
Sowjanya -
Change excel sheet name when using spool
Hi, all! I encounter a problem when I was trying to spool a sql to excel using sqlplus.
That is the sheet name is as same as the file name, but the requirement of client is the sheet name is "specific" and not as same as file name, could you please help if there is any solution for this.
thanks a lot for your help.hi
when you create XLS file manually in the command line, can you set the sheet's name?
- no
unless you use some "Basic's" commands to manipulate the file later within your batch file, I think there's no way (excel.exe file provides no options in the command line). -
I wonder if you can help? I get an error when adding any SAP task to the Control Flow
We are a duel server implementation - this is on the SQL server...
"Failed to create the task.
Can not create the task with the name "Osoft.Services.Application.DataMgr.Task.SSISAdmin, OSoftTaskAdmin, version=4.2.00.400, Culture=neutral, PublicKeyToken=bf6c37fa78f5a648". Verify that the name is correct.Hi Experts,
Whats a way that to have development of packages having BPC Tasks on 2 machines because as per this thread we can only use BPC tasks on Application server.
Thanks,
Rohit -
What to set pause button to when using invisiblepause swf
Hi Folks-
I am using the invisiblepauseplay swf in my project in Captivate 4. I have it set to rest of project. What should I set the pause button that sits underneath it to for best functionality? Continue? No action?
Thanks for your help?
RitaHi Rita
Sorry, but you lost me there.
Invisible Pause/Play SWF? Where did you acquire this?
If you are inserting a SWF that would seem to pause or play the slide it's on, why is it sitting over a Button?
Cheers... Rick
Helpful and Handy Links
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcerStone Blog
Captivate eBooks
Maybe you are looking for
-
How can I enter my podcast in more than one category, to reflect the fact that it covers arts, education and society and culture? Thank you for your time!
-
Issue with Adobe Reader (Desktop app) on Mac OS X Lion
Hi there, I want to print a pdf like a booklet. I first try with Adobe Reader 9 but it says something lik "Unable to print document" and "no pages selected for print". And the print to pdf doesn't work either. here is a screenshot of the parameters p
-
[Solved] Xorg update from testing: display corruption.
Hello! Today I did a update in my system, pacman updated 3 packs: [2008-09-08 09:05] upgraded libx11 (1.1.4-3 -> 1.1.5-1) [2008-09-08 09:05] upgraded pixman (0.11.8-1 -> 0.11.10-1) [2008-09-08 09:05] upgraded xorg-server (1.4.99.906-3 -> 1.5.0-1) My
-
Interrupting Nested For Loops/Sequences
I have a lagre program consisting of nested for loops and case statements calibrating an array of patch antennas. The entire process of which will take about 15 hours. During this time, I want to have two things happen. Every 20 minuites or so, I wan
-
Problem: Objects become invalid so easily
Hi All, We are running Oracle 9i Standard Edition, which was downgraded from the Enterprise Edition, because they want to save $50K/year. I have noticed even in the enterprise edition that some objects (sprocs, functions, triggers, packages) could be