|
|
sasikumar.prs wrote: please provide me complete steps and javascript code for FB connect for an asp.net web application project
It does not work like this here.
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.
Try them and tell if you face issues.
Members will be more than happy to help like this.
sasikumar.prs wrote: but Icould not able to understand properly.
Share specific issues you faced and users will be able to help you. Be elaborate and clear on what you are trying and what troubled you.
|
|
|
|
|
I havent got ans in ASP discussions :
Hi,
I have used this code to change the cell value :
<script type="text/javascript">
function Open(IdNeed)
{
var grid = document.getElementById('<%=gvEstelam.ClientID%>');
grid.rows[1].cells[4].innerHTML = 152;
alert(grid.rows[1].cells[4].innerHTML);
}
the alert show that the "grid.rows[1].cells[4]" value has changed to 152 and also in gridview it changed
BUT
when i click on OK button of alert then the value is change same as before(ex.500).
How to set the new value to remain ?
And this is my cell code :
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageEstelamBuyingKala" ImageUrl="~/ServerFile/ApplicationFiles/Icons/Button/add.png"
Width="25" runat="server" OnClientClick='<%# " Open("+ DataBinder.Eval(Container.DataItem,"Id") + ");" %>' />
</ItemTemplate>
</asp:TemplateField>
|
|
|
|
|
jojoba2011 wrote: How to set the new value to remain ?
It looks like you are having a postback after the OnClientClick method. On server side, you must be rebinding the grid and thus old data remains. Just put a debugger on server side and see for yourself.
To avoid the postback, truncate the request at client side itself post calling Open method, like:
OnClientClick='<%# " Open("+ DataBinder.Eval(Container.DataItem,"Id") + ");" %> return false;'
|
|
|
|
|
So im trying to creae a dynamic data project using asp.net.
my project has 2 tables, FruitTable and SellerTable.
I had it set so the primary key in 'fruit table': name. was the foreign key in 'seller table'
I added a new class which contains the code to link to the new fieldTemplate I added(DropDown)
<pre lang="c#">[MetadataType(typeof(UsingDropDownMetadata))]
public partial class UsingDropDown
{
}
public class UsingDropDownMetadata
{
//DropDown is name of field templates
[UIHint("DropDown")]
//use in field date in tracing table
public object DropDownFromTextBox { get; set; }
}
then in the dropDown_Edit.ascx I used the toolbox to get a drop down list and link it to the fruit table.
Now when a user creates a new item, they can select the names of fruit to add.
However I would like to hard code this so I have removed the r/s btn fruit and seller table
In dropdownEdit.ascx iv added it manuall
<asp:DropDownList id="DropDownList1" runat="server"
DataSource="<% databindingexpression %>"
DataTextField="DataSourceField"
DataValueField="DataSourceField"
AutoPostBack="True|False"
OnSelectedIndexChanged="OnSelectedIndexChangedMethod">
<asp:ListItem value="value" selected="True|False">
Text
</asp:ListItem>
</asp:DropDownList>
then in the dropdownedit.ascx.cs
I want to hard code to pull across the values but am not sure if I am doing this right. please advise
protected void OnSelectedIndexChangedMethod(object sender, EventArgs e)
{
}
|
|
|
|
|
i am trying to show multiple locations its showing proper but the pop box showing same at every place
for (i = 0; i < loc1.length; i++) {
var sunloc = loc1[i].split(',');
marker = new google.maps.Marker({ position: new google.maps.LatLng(sunloc[1], sunloc[2]), map: map });
google.maps.event.addListener(marker, 'click', (function (marker, i) {
return function () {
infowindow.setContent(sunloc[0]);
infowindow.open(map, marker);
}
})(marker, i));
}
}
|
|
|
|
|
kapil sharma 49 wrote: loc1
What is the value in it?
kapil sharma 49 wrote: infowindow.setContent(sunloc[0]);
You sure that the value of sunloc[0] is not same for all?
|
|
|
|
|
I have some Javascript code that if I have a null value in the return of any of the below I get " " in my receiving ASP.net page... any clues? I think I need an if/then to handle the " " and return "":
function GetRowValue(val1, val2, val3, val6, val4, val7) {
window.opener.document.getElementById("txtTransferFromLANID").value = val1;
window.opener.document.getElementById("txtTransferFromFName").value = val2;
window.opener.document.getElementById("txtTransferFromLName").value = val3;
window.opener.document.getElementById("txtUnitPrice").value = val6;
window.opener.document.getElementById("txtSoftwareShortName").value = val4;
window.opener.document.getElementById("txtOriginalTransactionNumber").value = val7;
window.close();
}
|
|
|
|
|
Are you sure your expressions are the right way round? You are setting elements in the window from the input parameters and then immediately closing the window.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Everything is transfering properly to the ASP.net textboxes, except when there is a null value.
|
|
|
|
|
Well it's better than having the code crash.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Javascript doesn't know what to do with a null value, so you have to write more code to handle the null value like = "";
|
|
|
|
|
i am working with jquery tabslideout plugin. it wporks fine but i want to detect when tabslideout plugin slide in and out. if i could detect then i can call another routine. no idea is coming to my head to determine how to capture when tabslideout div slide-in and out. so please guide me. thanks
here is my code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>
<script type="text/javascript">
$(function(){
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle', //class of the element that will become your tab
pathToTabImage: 'images/contact_tab.gif', //path to the image for the tab //Optionally can be set using css
imageHeight: '122px', //height of tab image //Optionally can be set using css
imageWidth: '40px', //width of tab image //Optionally can be set using css
tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left
speed: 300, //speed of animation
action: 'click', //options: 'click' or 'hover', action to trigger animation
topPos: '200px', //position from the top/ use if tabLocation is left or right
leftPos: '20px', //position from left/ use if tabLocation is bottom or top
fixedPosition: false //options: true makes it stick(fixed position) on scroll
});
});
</script>
<style type="text/css">
.slide-out-div {
padding: 20px;
width: 250px;
background: #ccc;
border: 1px solid #29216d;
}
</style>
<div class="slide-out-div">
<a class="handle" href="http://link-for-non-js-users.html">Content</a>
<h3>Contact me</h3>
<p>Thanks for checking out my jQuery plugin, I hope you find this useful.
</p>
<p>This can be a form to submit feedback, or contact info</p>
</div>
tbhattacharjee
|
|
|
|
|
Would jquery blur() function assist you? I added this to your code and it functions:
$('.slide-out-div').click(function() {
$('.slide-out-div').blur();
});
$('.slide-out-div').blur(function() {
alert('Handler for .blur() called.');
});
vbmike
|
|
|
|
|
thanks
tbhattacharjee
|
|
|
|
|
You are welcome, I hope it works for you.
vbmike
|
|
|
|
|
Is there a way to convert a html to pdf file, without making a call to the server ?
|
|
|
|
|
Can you explain more why you don't want to go to the server?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The thing is that the app we are creating is targeting the mobile phones(read iPhones). We do not want any network issues. So we are wanting to do as much as possible on the client side itself. Of course if there is no other option we will make a server call.
|
|
|
|
|
|
I'm kind of baffled here. This is a script that came in a customer project. I thought I fixed it, but when I run it, the slide counter goes 0 then 3 then 2 instead of 0 1 2
$(document).ready(function () {
var slideContainer = $('[id*="_slideshow_container"]');
var slidesHolder = $(slideContainer).children();
var slideWidth = $(slideContainer).width();
var slides = $(slidesHolder).children();
var slidePos = 0;
var slideTotal = slides.length;
var currentSlide = 0;
var delay = 5000;
var slideTime = 1000;
$(slideContainer).css({
"overflow": "hidden",
"position": "relative"
});
$(slidesHolder).css({
"position": "absolute",
"top": "0px",
"left": "0px"
});
for (var i = 0; i < slides.length; i++) {
$(slides[i]).css({
"position": "absolute",
"top": "0",
"left": slidePos + "px"
});
slidePos = slidePos + slideWidth;
}
$(slidesHolder).css('width', slidePos + slideWidth);
$(slides).first().clone().css({
"left": slidePos + "px"
}).appendTo(slidesHolder);
animate();
function animate() {
$('[id*="_lbl_SS_Collapse"]').text(currentSlide);
$(slidesHolder).delay(delay).animate({
left: "-=" + slideWidth
}, slideTime, function () {
if (currentSlide < slideTotal) {
currentSlide++;
animate();
}
else {
$(slidesHolder).css({
"left": "0px"
});
currentSlide = 0;
animate();
}
});
}
});
|
|
|
|
|
OK I get it now. The Javascript runs full speed until complete, but the delay in the animation function drags behind the execution of the code, so You can never really detect the end of the animation loop.
So for now, I'll just loop through some marketing messages, and then stop
I put a for loop in the function instead
function animate() {
for (var i = 0; i < slideTotal - 1; i++) {
$(slidesHolder).css({
'left': '0px'
});
$(slidesHolder).delay(delay).animate({
"left": "-=" + slideWidth
}, slideTime, 'swing', function () {
});
}
}
|
|
|
|
|
So this takes all the div and makes a filmstrip out of them, and moves each cell left, and then rewinds and starts again. I think it's simple in design. Feel free to comment on it.
$(document).ready(function () {
load_DisplayAdvertising_Horizontal();
});
function load_DisplayAdvertising_Horizontal() {
var view_Width = 980;
var view_Height = 250;
var view_Time = 4000;
var ease_Time = 1400;
var child_Count = parseInt($('[id*="_slide_container"]').children().length);
$('[id*="_slide_container"]').css({
"position": "relative",
"width": view_Width + "px",
"height": view_Height + "px",
"overflow": "hidden"
});
var fsWidth = 0;
var fsHeight = 0;
$('[id*="_slide_container"]').find("._slide_child").css({
"display": "inline",
"position": "relative",
"float": "left",
"top": "0px",
"left": "0px"
}).each(function (index) {
fsWidth = fsWidth + parseInt($(this).css("width"));
if (fsHeight < parseInt($(this).css("height"))) {
fsHeight = parseInt($(this).css("height"));
}
})
var div_filmStrip = document.createElement("div");
div_filmStrip.style.textAlign = "left";
div_filmStrip.style.width = fsWidth + "px";
div_filmStrip.style.height = fsHeight + "px";
div_filmStrip.style.position = "relative";
div_filmStrip.style.left = "0px";
div_filmStrip.style.top = "0px";
var temp_InnerHTML = $('[id*="_slide_container"]').html();
div_filmStrip.innerHTML = temp_InnerHTML;
$('[id*="_slide_container"]').empty();
$('[id*="_slide_container"]').append(div_filmStrip);
run_DisplayAdvertising_Horizontal(
div_filmStrip,
fsWidth,
view_Width,
child_Count,
view_Time,
ease_Time
);
}
function run_DisplayAdvertising_Horizontal(obj, cW, vW, cC, vT, eT) {
if (cC > 0)
{
var fsWidth = parseInt(cW - vW);
var fsRewind = parseInt(vT / cC);
for (var i = 0; i < cC-1; i++)
{
$(obj).delay(vT).animate({
left: '-=' + vW
}, eT, "linear", function () {
var fsPosition = parseInt($(obj).css("left"));
if (fsPosition == -fsWidth) {
$(obj).delay(vT).animate({
left: '0px'
}, fsRewind, "linear", function () {
run_DisplayAdvertising_Horizontal(obj, cW, vW, cC, vT, eT);
});
}
});
}
}
}
The HTML Side
<div id="_slide_container" style="width: 980px; height: 254px; text-align: center; margin: 0px auto; display: block;">
<div id="slideChild_0" class="_slide_child" style="width: 980px; height: 250px; display: block;">
<asp:Image ID="img_slideshow_child_0" runat="server"
ImageUrl="~/EN-US/images/SlideShows/SS_StrategyPlanning_980x250.png" />
</div>
<div id="slideChild_1" class="_slide_child" style="width: 980px; height: 250px; display: none;">
<asp:Image ID="img_slideshow_child_1" runat="server"
ImageUrl="~/EN-US/images/SlideShows/SS_WebDesign_980x250.png" />
</div>
<div id="slideChild_2" class="_slide_child" style="width: 980px; height: 250px; display: none;">
<asp:Image ID="img_slideshow_child_2" runat="server"
ImageUrl="~/EN-US/images/SlideShows/SS_WebDevelopment_980x250.png" />
</div>
<div id="slideChild_3" class="_slide_child" style="width: 980px; height: 250px; display: none;">
<asp:Image ID="img_slideshow_child_3" runat="server"
ImageUrl="~/EN-US/images/SlideShows/SS_HKB_Project_2_980x250.png" />
</div>
<div id="slideChild_4" class="_slide_child" style="width: 980px; height: 250px; display: none;">
<asp:Image ID="img_slideshow_child_4" runat="server"
ImageUrl="~/EN-US/images/SlideShows/SS_InternetCommerceEngine-5_980x250.png" />
</div>
</div>
|
|
|
|
|
With a bit more detailed description this would be worth posting[^] as a Tip/Trick. It will soon get lost here, whereas Tips & Tricks and Articles can be searched and browsed quite easily.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I thought about that last night, but sure if it was worthy of it, or if the code was clean enough. But based on the quality I usually see here, I should not doubt myself.
Thanks, this will be my first publish here on CJ
|
|
|
|
|