I currently have a ColdFusion page that has a list division on the left side and a details division on the right. When a record is added through a button-click on the details side, I want to rebuild the whole page so the new record will be displayed in the list. I have set the CFLOCATION to go to the complete page (the one containing the two divisions), but what I'm getting is that it displays the original list in the left division, and then displays the complete page (list and details) in the right division. How can I make my CFLOCATION tag replace the original page rather than trying to just cram it into the one division? Here's the CFLOCATION tag:
<CFLOCATION URL="Listframe.cfm?ID=#Form.IDDancer#">
You could possibly use JavaScript (instead of cflocation) to force the location of the top/parent page.
I've used code like this before:
<script>
window.parent.location.href = "https://www.google.com";
</script>
Other options:
How to reload Main Page from within an iFrame
Related
I am working on a test that checks that all images on a page are visible. I'm running into an issue where its only pulling the link from the first img on the page and logs it the length of the loop. Im currently getting a count of all the images, and in that count I loop through and pull the img source. There are no special classes, or ids. The only thing I have to go off of is . I'm guessing I will somehow need to parse the entire HTML since robotframework only looks at what is viewable on the screen?
My end goal is to pull all img sources on a page and confirm each one returns a 200 status code.
Here is what I have now:
#{all_image_sources} Create List
${all_images} Get Element Count //body//img
FOR ${image} IN RANGE ${all_images}
${img_src} Get Element Attribute tag:img src
log ${img_src}
Append To List ${all_image_sources} ${img_src}
END
Log List ${all_image_sources}'''
You might consider using Get WebElements, this will give you each image locator in a list. You can then loop through the list to get each src attribute.
example:
#{all_image_sources} Create List
${all_images} Get WebElements //body//img
FOR ${image} IN #{all_images}
${img_src} Get Element Attribute ${image} src
Append To List ${all_image_sources} ${img_src}
END
Log List ${all_image_sources}
Get WebElements
I search the documentation but I didn't know exactly how to call that.
I have a template Index2Name that return a name based on an index.
I'm trying to use that name in a link:
[[Articles/{{Index2Name|0001}}|{{Index2Name|0001}}]]
or
Image:Big-0001.png|link=Articles/{{Index2Name|0001}}|''{{Index2Name|0001}}''
In the last example, the name is printed but the link doesn't work. (In gallery element)
It doesn't work. The value from the template is printed but it is not converted to a link.
How can I make this works? And does this have a name? (For future reference)
EDIT: Index2Name is a simple switch returning a few words depending of the id. Since I'm using subpages I only want the name to appear (Example: MyArticle) but the link is Articles/MyArticle
Could you clarify exactly what you want to happen please. (Where you want to link and how you want it to look).
But for example if you use:
[[Image:Big-0001.png|''{{Index2Name|0001}}'']]
It will link to the page Image:Big-0001.png with the link text being the output of:
''{{Index2Name|0001}}''
Or if you use:
[[Image:Big-001.jpg|link=Articles/{{Index2Name|0001}}]]
The image, when clicked, will redirect you to the output of:
{{Index2Name|0001}}
I am new to Django. I have a requirement where in based on the TypedChoiceField list selection some part of the form should be changed. Meaning for a particular selection I need some fields to be displayed on the webpage and for other selection I need some other fields to be displayed on the webpage.
If there is already a similar page existing, please point me to that page, it will help me a lot.
What I would do is set up a javascript static file (here's a tutorial) that hides and shows elements using the select method.
For example, if you had categories that each needed a different set of fields, you could put all your categories into a <select> element and then using some simple JS, display the desired fields:
$("#select_object").change(function () {
toggleFields();
});
In that case, #select_object would be that <select> element. Whenever it changes (the user selects something) it shows the fields you want.
I use Gxt-2.2.5-Rtl (http://code.google.com/p/gxt-rtl/) and try to show html content through HtmlContainer's setUrl() method. But unfortunately the result is flipped version of my expected output. For example suppose our input html contains a table which starts columns from right to left as id, name, description. So what we get is a table that their column starts from expected order BUT FROM LEFT TO RIGHT!
I used Gxt's Html and Gwt's HTML and HtmlPanel classes, but this problem doesn't solve.
In addition I should say when I use TabItem or ContentPanel's setUrl() method this problem disappears. But I prefer to don't use that method and because:
1- Just last loaded iFrame is visible at a time. This means that navigating through other preloaded tab items displays a blank page.
2- Poor control over loaded page through GWT, like catching click events and etc.
Expected output:
http://www.freeimagehosting.net/yow6l
Wrong output:
http://www.freeimagehosting.net/8opdt
I changed the titles to English for better communicating! :)
Thanks!
Hi I am using s:url tag for making a url, I need it to paginate my jsp to several pages.
So I need to send next or previous when we click on next or previous link. But when I click on Previous it shows me url on address bar like someAction?previuos=prev then I click on Next it displays someAction?previuos=prev&Next=Next when I only need someAction?Next=Next.
I have given different names to the url as for Previous link <s:url name="urlPrev"> and for next <s:url name="urlNext">
I don't how to differentiate them. What is wrong in my code?
The <s:url/> tag should default to the current action, without any parameters. You should just be able to say in your page:
<s:url>
<s:param name="Next" value="'Next'"/>
</s:url>
<s:url>
<s:param name="Previous" value="'Previous'"/>
</s:url>
Note that the <s:a/> tag behaves much like the tag excepting that it produces an html anchor of course so put the link name in the body. This should solve your tag issues...
Just to point out paging is roughly done on web sites by passing parameters which account for start_index and number_of_records_per_page. The "Next" button then simply adds number_of_records_per_page + 1 for the value of start_index for next. To decrement subtract number_of_records_per_page. By standardising the names all list based actions become easier to write.
Consult http://struts.apache.org/2.3.1.2/docs/tag-reference.html for use of these tags (one thing to note is the name parameter is not listed as a property for the url tag).