How do we anchor to top of page on page load?
HI! I use iframes and when a user clicks a link in the middle
of a page it
loads the new child iframe in the iframe BUT the new page is
at the same
vertical spot as the previous page. I want the page to be
loaded at the top
so the user can see the see it at the beginning.
I thought of adding an anchor to the link but this would put
the child page
at the top but also hide the top of the main parent. so is
there way of
loading the child page and at the same time make the parent
page stay at the
top?'
Paul
darrel wrote:
>> Lets say you have a normal page ( without Iframes )
and at the bottom of
>> the page you have a link. now, if you click on that
link the page will
>> load and you will now be at the top of that page,
right! now. in my case
>> however you will not be at the top, you will be in
fact at the bottom of
>> the new page.
>
> What do you mean by 'new page'?
>
> If you mean the link you are clicking on ONLY loads a
new page within the
> iFrame, then this is perfectly normal. You are not
loading a new page
> within the browser--you're staying on the same page, as
such, nothing
> should change with the parent page...only the iFrame.
>
>> so I figure perhapes a function that works with an
onload event.
>
> You could probably use javascript. Have the onClick
event handle that. I
> don't know what syntax to use off the top of my head,
though.
>
> That said, why are you using an iFrame? They're often
used for wrong
> reasons. I bet we can figure out a better solution for
you without iframes
> at all.
>
> -Darrel
Hi! I use iframes to load templates that are brought in by
java script. My
design has a top flash animation with static expandable
images on both sides
and iframes are used on one side to display the templates and
the other side
is text. The Parent does not get reloaded because I dont want
the flash
animation to be reloaded as it take a few seconds to load. so
by using
iframes I only need to load the flash ani once. and the other
pages that
make up the larger part of the page are loaded into the
iframe.
Now that I think of it, I dont think the unload event in the
body would work
because this means that body would have to be reloaded. I
would have to
trigger it another way. so I would have to trigger it from
either inside
childpage that gets loaded or from the link itself. hmmm, do
you have any
ideas?
Paul
Similar Messages
-
How do you add a "top of page" button to an iWeb page?
How do you add a "top of page" button to an iWeb page?
Two solutions:
The Easy One:
Create a Form (which will be the button) and add text to it or choose a picture from iphoto. Now give the form/picture a hyperlink to the same site. So now if you press the button, the site will refresh and start at the beginning/top
The advanced way:
1. Publish your site on the web (not just local). Copy the URL
2. Now create a Button like displained in the solution above. As Hyperlink you'll now have to set external site and paste the before copied link AND add the following at the end of the url: #widget0
3. Add a html widget to the top of the site.
4. The widget's content should be <a name="anchor"></a>
5. Publish your site again on the web and look wether it works.
This way won't work, if the created site is linked as an iframe. -
How do I edit my Top Sites Page on Mavericks?
I am trying to figure out how do I edit the top sites page. Before you were able to click an edit button that allowed you to delete and pin the pages but now I can't figure it out. More specifically I want to know who to delete certain pages.
I know this is old, but I just figured I would shed some light on solving the issue I think you are actually speaking of. When I upgraded, I immediately noticed I could not click "edit" in the bottom corner to change the amount of top sites, which slightly irritated me. I tried everything, and eventually thought they had done away with the feature altogether, but then I saw if you click safari (from here, that Bold Safari word in the top left corner of the screen) and choose 'preferences' it will take you to a tab that allows you to modify the number of top sites, allowing me to go back down to 6. Easier to read, easier to make sense of. (A lot of websites cannot be made out when they are '16 top site' size. So this was something I wanted to fix, with my 11" screen.) Hope this helps!
-
How to manage wait time in between pages loading
Hi,
Could you please help me "How to manage wait time in between pages loading while playback script using etester?
Thanks,
RJ.RJ
You can edit the think time in eTester by:
Expand the tree node and right click on the address bar to select Address Properties, you can then edit the text box called Delay Before PlayBack
If you like to specify think time between actions instead of action groups: right click on the actions ans select properties, there are 2 text boxes in the new window; one for milliseconds and the other for seconds
Hope this helps
Alex -
How to display values in top of page in ALV report
Hai,
This is my billing report program, i developed that object by using ALV but i could not able to use Top-of-page. please any one correct my code,
*& Report ZE0232_ALV_BILLING *
report ze0232_alv_billing.
type-pools: slis.
data: repid like sy-repid.
data: fieldcatalog type slis_t_fieldcat_alv,
wa_fieldcatalog type slis_fieldcat_alv.
data : ievent type slis_t_event,
wevent type slis_alv_event.
data: sal_text like tvkot-vtext,
DIS_TEXT LIKE TVTWT-VTEXT,
DIV_TEXT LIKE TSPAT-VTEXT.
tables: vbrk.
data: begin of i_vbrk occurs 0,
vbeln like vbrk-vbeln,
fkdat like vbrk-fkdat,
erdat like vbrk-erdat,
kunrg like vbrk-kunrg,
name1 like kna1-name1,
netwr like vbrk-netwr,
stext like tvkot-vtext,
dtext like tvtwt-vtext,
divtext like tspat-vtext,
end of i_vbrk.
selection-screen begin of block billing with frame.
parameters: salesorg like vbrk-vkorg.
select-options: dischanl for vbrk-vtweg,
division for vbrk-spart,
bildat for vbrk-fkdat.
selection-screen end of block billing.
select vbeln fkdat erdat kunrg netwr from vbrk into corresponding fields of table i_vbrk where vkorg = salesorg
and vtweg in dischanl
and spart in division
and fkdat in bildat.
select vtext from tvkot into sal_text where vkorg = salesorg and spras = 'EN'.
endselect.
select vtext from TVTWT into DIS_text where VTWEG IN dischanl and spras = 'EN'.
endselect.
select vtext from TSPAT into DIV_text where SPART IN DIVISION and spras = 'EN'.
endselect.
loop at i_vbrk.
move: sal_text to i_vbrk-stext,
DIS_TEXT TO I_VBRK-DTEXT,
DIV_TEXT TO I_VBRK-DIVTEXT.
modify i_vbrk.
endloop.
perform get_fieldcatalog.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = repid
I_GRID_TITLE =
i_callback_top_of_page = 'TOPS'
it_fieldcat = fieldcatalog
tables
t_outtab = i_vbrk
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
*& Form GET_FIELDCATALOG
text
<b>form tops.
write :/ 'Hai Welcome'.
endform. "tops</b>&----
*& Form get_fieldcatalog
text
form get_fieldcatalog.
wa_fieldcatalog-col_pos = '1'.
wa_fieldcatalog-fieldname = 'VBELN'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'SALES DOCUMENT'.
WA_fieldcatalog-rollname = 'VBELN'.
wa_fieldcatalog-hotspot = 'X'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '2'.
wa_fieldcatalog-fieldname = 'FKDAT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'BILL DATE'.
WA_fieldcatalog-rollname = 'VBELN'.
WA_fieldcatalog-hotspot = 'X'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '3'.
wa_fieldcatalog-fieldname = 'ERDAT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'CREATED DATE'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '4'.
wa_fieldcatalog-fieldname = 'KUNRG'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'CUSTOMER NO'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '5'.
wa_fieldcatalog-fieldname = 'NAME1'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'CUSTOMER NAME'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '6'.
wa_fieldcatalog-fieldname = 'NETWR'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'NET VALUE'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '7'.
wa_fieldcatalog-fieldname = 'STEXT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'SALES ORG'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '8'.
wa_fieldcatalog-fieldname = 'DTEXT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'DIS.CHANNEL'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
wa_fieldcatalog-col_pos = '9'.
wa_fieldcatalog-fieldname = 'DIVTEXT'.
wa_fieldcatalog-tabname = 'I_VBAK'.
wa_fieldcatalog-seltext_m = 'DIVISION'.
append wa_fieldcatalog to fieldcatalog.
clear wa_fieldcatalog.
endform. "GET_FIELDCATALOGHI see this report
you can know how to write TOP-OF_PAGE code
and insert LOGO also
*& Report ZTEST_ALV_LOGO
REPORT ztest_alv_logo.
TYPE-POOLS : slis.
*ALV Formatting tables /structures
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: gt_events TYPE slis_t_event.
DATA: gs_layout TYPE slis_layout_alv.
DATA: gt_page TYPE slis_t_listheader.
DATA: gs_page TYPE slis_listheader.
DATA: v_repid LIKE sy-repid.
*ALV Formatting work area
DATA: w_fieldcat TYPE slis_fieldcat_alv.
DATA: w_events TYPE slis_alv_event.
DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
INITIALIZATION.
PERFORM build_events.
PERFORM build_page_header.
START-OF-SELECTION.
*perform build_comment. "top_of_page - in initialization at present
SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
*perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
*USING = Row, Column, Field name, display length, table name, heading
*OR
PERFORM build_fieldcat.
gs_layout-zebra = 'X'.
*top of page event does not work without I_callback_program
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_structure_name = 'BSID'
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'This is the grid title'
I_GRID_SETTINGS =
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
TABLES
t_outtab = gt_bsid.
Form..............: populate_for_fm
Description.......: Populates fields for function module used in ALV
FORM populate_for_fm USING p_row
p_col
p_fieldname
p_len
p_table
p_desc.
w_fieldcat-row_pos = p_row. "Row Position
w_fieldcat-col_pos = p_col. "Column Position
w_fieldcat-fieldname = p_fieldname. "Field name
w_fieldcat-outputlen = p_len. "Column Lenth
w_fieldcat-tabname = p_table. "Table name
w_fieldcat-reptext_ddic = p_desc. "Field Description
w_fieldcat-input = '1'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " populate_for_fm
*& Form build_events
FORM build_events.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events.
READ TABLE gt_events
WITH KEY name = slis_ev_user_command
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_user_command TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
READ TABLE gt_events
WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_top_of_page TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
ENDFORM. " build_events
*& Form USER_COMMAND
When user command is called it uses 2 parameters. The itab
passed to the ALV is in whatever order it currently is on screen.
Therefore, you can read table itab index rs_selfield-tabindex to get
all data from the table. You can also check r_ucomm and code
accordingly.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
READ TABLE gt_bsid INDEX rs_selfield-tabindex.
error checking etc.
SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDFORM. "user_command
*& Form top_of_page
Your own company logo can go here if it has been saved (OAOR)
If the logo is larger than the size of the headings in gt_page,
the window will not show full logo and will have a scroll bar. Thus,
it is a good idea to have a standard ALV header if you are going to
use logos in your top of page.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_page
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form build_fieldcat
*Many and varied fields are available here. Have a look at documentation
*for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
FORM build_fieldcat.
w_fieldcat-fieldname = 'BUDAT'.
w_fieldcat-seltext_m = 'Dte pst'.
w_fieldcat-ddictxt(1) = 'M'.
w_fieldcat-edit = 'x'.
Can change the position of fields if you do not want them in order
of the DDIC or itab
w_fieldcat-row_pos = '1'.
w_fieldcat-col_pos = '10'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " build_fieldcat
*& Form build_page_header
gt_page is used in top of page (ALV subroutine - NOT event)
*H = Header, S = Selection, A = Action
FORM build_page_header.
For Headers, Key is not printed and is irrelevant. Will not cause
a syntax error, but is not used.
gs_page-typ = 'H'.
gs_page-info = 'Header 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'H'.
gs_page-info = 'Header 2'.
APPEND gs_page TO gt_page.
For Selections, the Key is printed (bold). It can be anything up to 20
bytes. It gets printed in order of code here, not by key value.
gs_page-typ = 'S'.
gs_page-key = 'And the winner is:'.
gs_page-info = 'Selection 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'S'.
gs_page-key = 'Runner up:'.
gs_page-info = 'Selection 2'.
APPEND gs_page TO gt_page.
For Action, Key is also irrelevant.
gs_page-typ = 'A'.
gs_page-info = 'Action goes here'.
APPEND gs_page TO gt_page.
ENDFORM. " build_page_header
<b>Reward if useful</b> -
How to avoid multiple Header(TOP-OF-PAGE) because of page break
Hi All,
I am working with a classical report in which we are getting multiple header because of page break.
can we get a single header, in other words can we trigger TOP-OF-PAGE event only once not every
time when a page break occurs.
Regards
Manishuse TOP_OF_LIST Event Instead of TOP_OF_PAGE.
Sandip Sonar. -
How to use the Observer when a page loads
Anybody know how to use the
Spry.Utils.addClassName('DivName','selected') and then fire the
Spry.Utils.addClassName with onLoad?
I am loading a page with the selector utils in it into a div
and then I think I must need an Observer to get the
Spry.Utils.addClassName to work when this page loads in a div.
Any help would be greatly appreciated.
Thank you,
Bisser.I added Spry.Utils.addClassName('DivName','selected') in the
Script after the constructor and after the effects and it works
fine. Thank you for your help to get me going.
Well after the fact, this solution was a problem because it
loads the selector each time I loaded the file.
kinblas had the correct answer that I was looking for.... as
it loads the selector as a 3rd argument.
ie:
Spry.Utils.updateContent('mainDIV','/menu.php', function() {
Spry.Utils.addClassName('DivName','selected'); });
Thanks to both of you for your continued support.
Bisser. -
How to hide business process stage on page load in crm 2013
Please tell me how to hide process stage on page load in crm 2013.
for example: Develop, Propose,Quotation... these are business process stages and I have a custom field named "type"
If type value =1 then hide Propose stageHello,
That is not possible. What I would suggest is to create several processes for same entity and switch between them using plugin. Sample code for it -
https://deepakexploring.wordpress.com/tag/updating-process-id-in-crm-2013/
Dynamics CRM MVP/ Technical Evangelist at
SlickData LLC
My blog -
How to set the bind variable on page load and execute query ?
Hi All,
I am using Jdeveloper 11.1.1.5
I have a table called "Employee"
Columns :- id , name , location
Data :- 1, ,james , chicago
2 ,Raj ,capetown
Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
How can i use the bind variable appropriately ??
Please suggest !!!!
Thanks.Hi,
Check
http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
-Suresh -
How to Auto Select some RadioButton on page load using ADF/JSF
Hi,
I am learning ADF and need some help. I have multiple radio buttons and couple of text boxes on my page. How can I make some radio button be selected based on some value from a database table and also populate the text boxes with the corrosponding value when a page loads. Any tips on how it can be done using ADF. Any sample tutorial will be helpful.
ThanksHi,
when you e.g. use ADF BC then the radio button should be selected automatically based on the value of the attribute. If the row is new then you can have a default value specified in the ADF BC ViewObject attribute.
However, if you just dragged the radio button and checkboxes onto the page - not using any ADF binding - then you will have to create a managed bean with a field variable (incl. setter/getter methods) to link the radio button's value property to it using Expression Language
Frank -
APEX dynamic action - How to hide an item after the page loads
Hello
I have a form with item Type, lesson and page. I want to create a dynamic action like "on page load" if Type = x then don't show lesson and page items. .
How do I say if Type=x then don't show lesson and page. otherwise show them.
Please note Dynamic action, Event=Page load
Thankscreate dynamic action like
Event:Change
Selection Type:Item
Item:Type
Condition:Equal To
value:X
Select Action:Hide
Select Items to hide
also create opposite false action
and click on page checkbox below action to yes
Hope this may helps
pars. -
How to execute a view object on page load
Hi
I have got two pages, one is login page and the other is search page.
When ever the user who has logged in, navigates to the search page,
following events should occur.
1) a view object should get executed. This view object should check whether there is a default search for the user who has logged in( the check is made based on a boolean variable). This particular view object has got a bind variable.
a) logged in user.
Based on who ever has logged in, the bind variable should be set as the logged in user and all the attributes concerning the default search for the logged in user must be populated in select input text components in the search page. ( there are certain select input text components in the search page).
If there is no default search for the logged in user, then the search page should open up, but without any values populated in the select input text component.
Please let me know if i am not clear with my question.
My ultimate aim is to execute a view object on page load for which the bind variable is set as the logged in user.actually, your requirement isn't exactly to execute a view object on "a" page load, as in ageneric page load, that would be little more intensive , with you requiring an invokeAction in your page bindings etc.
Yours, i presume is a simple case wherein if you link your login command button at the initial screen to a method in your managed bean, should do the trick. Within the managed bean method code ,
get the username ( which you can probably store on the request at time of login) ,
get hold of your view object,
set the bind variable ,
execute the query on the VO ,
return an appropriate string outcome , which is handled by your faces context navigation rules.
Fairly straightforward procedure, unless there's something extra you want to do apart from just that.
K -
When using letter DIN5008-A how can i start on top of page 2?
Hello,
i use the draft letter DIN5008-A which comes with pages. On page 1 there is space for the adress of the recipient and so on.
on page to the pages starts 8 cm deeper because it has the same format like page one.
i would like to start on top page page 2. how i set this up?
thanks
martinHi Peter,
set the margin to the top for all pages and on the first page use an empty Textbox or transparent Shape with Textwrap to push the starting text down.
Brilliant!
Document Panel > Document > Document Margins > Top > 2.5 cm
(Menu > View > Show Layout for clarity.
Text Boxes shown with Borders for clarity).
And Page 2:
Regards,
Ian. -
How to quickly go to top of page or end of page
i hve looked everywhere but cant find the answer. pls help.
when the web pages are lengthy, i cant go to top or end of page instantly.
thanksThat feature does not exist.
-
JEditorPnae setCaretPosition ? how to place position on top of page
Hi,
i am new to here ,
sorry if i violate anything.. anything.
we are making a multimedia cd with swing.
we show content in a JEditorPane . we paste a html document with paragraphs with known id"s
15,16,17,18... for example:
i want to place the caret( or make visible a paragraph)
Element text=doc.getElement(String.valueOf(paragraphId));
aJEditorPane.setCaretPosition(text.getStartOffset());
but this shows the paragraph at the end of visible area. But i want this to be seen at begining of page...
is it clear or i have talked so much? i do not known. Think u are searchinfg with
ctrl + F
when u hit enter resuly seems at bottom.
ok. thanks for helps..You need to scroll the viewport to the top of the scroll pane. You would do something like:
Rectangle r = textComponent.modelToView( text.getStartOffset() );
textComponent.scrollRectToVisible( r );
Maybe you are looking for
-
How to make use of a Badi in dynamic action on infotype?
Hi... i need to create a dynamic action on infotype 6 to create a record in infotype 207. I have to use badi for it. i need to use 'f' for 'Indicator for step'. right? kindly help.. Thnx and regards. Abhi.
-
When converting from a Word doc to a pdf using joboptions file settings, the layout changes - text is moved up as if the bottom margin is decreased. This is a problem when the heading on a new page is moved to bottom of the previous page. Please he
-
Golive: Troubling drop shadow on text.
When viewing a Golive web page in Safari, or even an old IE browser, some type (which I assigned a color to) looks fine, but in Firefox, a drop shadow of the same color is being created. I see nothing that could possibly cause this. Any thoughts?
-
Workaround: 16-bit installers in Vista
If some of you have some legacy programs you like to use that used to work in XP but don't install in Vista, here's a tip. The installer for your program may be 16-bit and Vista is an all 32-bit OS. There are many programs that have 16-bit installe
-
Making my MX860 fax work with OOMA Linx on dedicated number
My Canon MX860 fax will not fax send or receive through the OOMA Linx. Fax has dedicated number and direct line to Linx. When we changed to OOMA Telo fax would not send or receive, it did at first then quit, so when Linx came out it was touted as a